This commit is contained in:
Timothy Armes
2024-10-21 15:19:28 +02:00
parent 4181b92670
commit 91f4d30c7e
3 changed files with 39 additions and 44 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ export const LocaleChecker = ({ children }: LocaleCheckerProps) => {
) {
router.push({ pathname, params: params as any }, { locale: userLocale });
}
}, [locale, sessionData, status]);
}, [locale, sessionData, status, params, pathname, router, userLocale]);
// To avoid flickering, we don't render the children until we have the user's locale
if (status === "loading") return null;