Skip to content

Commit

Permalink
fix(pci-private-network): re-render issue on language change (#12641)
Browse files Browse the repository at this point in the history
ref: PRB0041352

Signed-off-by: Omar ALKABOUSS MOUSSANA <[email protected]>
  • Loading branch information
oalkabouss authored Oct 10, 2024
1 parent 786efc5 commit b1aa16b
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,14 @@ export default function LocalizationStep(): JSX.Element {
const { t } = useTranslation('new');
const { t: tCommon } = useTranslation('common');
const { t: tRegion } = useTranslation('region');
const { t: tRegions } = useTranslation('regions');
const { t: tRegions, i18n } = useTranslation('regions');

const {
data: regions,
isLoading: isRegionsLoading,
} = useProjectAvailableRegions(store.project?.id);

const [mappedRegions, setMappedRegions] = useState<TMappedRegion[]>([]);

const [state, setState] = useState<{ selectedContinent: string }>({
selectedContinent: undefined,
});
Expand Down Expand Up @@ -112,7 +111,7 @@ export default function LocalizationStep(): JSX.Element {

setMappedRegions(result);
}
}, [regions]);
}, [regions, i18n.language]);

return (
<StepComponent
Expand Down

0 comments on commit b1aa16b

Please sign in to comment.