fix language change not rerendering ui (#1638)

This commit is contained in:
David Luzar 2020-05-27 16:46:11 +02:00 committed by GitHub
parent 5b75925928
commit 5327e8a3dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 77 additions and 2 deletions

View file

@ -43,6 +43,7 @@ interface LayerUIProps {
onLockToggle: () => void;
zenModeEnabled: boolean;
toggleZenMode: () => void;
lng: string;
}
const LayerUI = ({
@ -325,6 +326,7 @@ const areEqual = (prev: LayerUIProps, next: LayerUIProps) => {
const keys = Object.keys(prevAppState) as (keyof Partial<AppState>)[];
return (
prev.lng === next.lng &&
prev.elements === next.elements &&
keys.every((key) => prevAppState[key] === nextAppState[key])
);