Skip to content
Snippets Groups Projects
Unverified Commit 1bf4ae77 authored by Alexander Polyankin's avatar Alexander Polyankin Committed by GitHub
Browse files

Fix rerender when locale changes (#20015)

parent bc5ee736
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,11 @@ export interface SettingsPageProps {
onStepShow: (step: number) => void;
}
const SettingsPage = ({ step, onStepShow }: SettingsPageProps): JSX.Element => {
const SettingsPage = ({
step,
onStepShow,
...props
}: SettingsPageProps): JSX.Element => {
useEffect(() => {
onStepShow(step);
}, [step, onStepShow]);
......@@ -25,13 +29,13 @@ const SettingsPage = ({ step, onStepShow }: SettingsPageProps): JSX.Element => {
<LogoIcon height={51} />
</PageHeader>
<PageBody>
<LanguageStep />
<UserStep />
<DatabaseStep />
<DatabaseHelp />
<PreferencesStep />
<CompletedStep />
<SetupHelp />
<LanguageStep {...props} />
<UserStep {...props} />
<DatabaseStep {...props} />
<DatabaseHelp {...props} />
<PreferencesStep {...props} />
<CompletedStep {...props} />
<SetupHelp {...props} />
</PageBody>
</div>
);
......
......@@ -6,11 +6,11 @@ export interface SetupProps {
isWelcome: boolean;
}
const Setup = ({ isWelcome }: SetupProps): JSX.Element => {
const Setup = ({ isWelcome, ...props }: SetupProps): JSX.Element => {
if (isWelcome) {
return <WelcomePage />;
return <WelcomePage {...props} />;
} else {
return <SettingsPage />;
return <SettingsPage {...props} />;
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment