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

pull/519/head
sct 4 years ago
parent d188f6ffad
commit fae4818957

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

Loading…
Cancel
Save