Fixed bug where 404 would freak out
This commit is contained in:
parent
fcd303fe6a
commit
9b162b0d49
|
@ -299,11 +299,12 @@ export default function AppLayout(props: Props): JSX.Element {
|
|||
const preferredLanguages = [...items].map(
|
||||
([code]) => code
|
||||
);
|
||||
console.log(router.asPath);
|
||||
appLayout.setPreferredLanguages(preferredLanguages);
|
||||
if (router.locale !== preferredLanguages[0]) {
|
||||
router.push(router.asPath, router.asPath, {
|
||||
locale: preferredLanguages[0],
|
||||
});
|
||||
}
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
|
Loading…
Reference in New Issue