fix(frontend): set locale cookie expiration to be much longer

This commit is contained in:
sct
2020-12-27 14:47:39 +00:00
parent d188f6ffad
commit fae4818957

View File

@@ -75,7 +75,10 @@ const CoreApp: Omit<NextAppComponentType, 'origGetInitialProps'> = ({
useEffect(() => {
loadLocaleData(currentLocale).then(setMessages);
setCookie(null, 'locale', currentLocale, { path: '/' });
setCookie(null, 'locale', currentLocale, {
path: '/',
maxAge: 60 * 60 * 24 * 365 * 10,
});
}, [currentLocale]);
if (router.pathname.match(/(login|setup)/)) {