🔀 Merge branch 'dev' into feature/add-basic-authentication
This commit is contained in:
@@ -49,6 +49,6 @@ export async function getStaticProps({ req, res, locale }: GetServerSidePropsCon
|
||||
const useStyles = createStyles(() => ({
|
||||
image: {
|
||||
margin: '0 auto',
|
||||
display: 'blcok',
|
||||
display: 'block',
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -4,8 +4,10 @@ import { Notifications } from '@mantine/notifications';
|
||||
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
|
||||
import Consola from 'consola';
|
||||
import { getCookie, setCookie } from 'cookies-next';
|
||||
import dayjs from 'dayjs';
|
||||
import locale from 'dayjs/plugin/localeData';
|
||||
import utc from 'dayjs/plugin/utc';
|
||||
import 'flag-icons/css/flag-icons.min.css';
|
||||
import moment from 'moment-timezone';
|
||||
import { GetServerSidePropsContext } from 'next';
|
||||
import { Session } from 'next-auth';
|
||||
import { SessionProvider, getSession } from 'next-auth/react';
|
||||
@@ -34,6 +36,9 @@ import {
|
||||
} from '../tools/server/getPackageVersion';
|
||||
import { theme } from '../tools/server/theme/theme';
|
||||
|
||||
dayjs.extend(locale);
|
||||
dayjs.extend(utc);
|
||||
|
||||
function App(
|
||||
this: any,
|
||||
props: AppProps<{
|
||||
@@ -53,8 +58,8 @@ function App(
|
||||
const { Component, pageProps } = props;
|
||||
// TODO: make mapping from our locales to moment locales
|
||||
const language = getLanguageByCode(pageProps.locale);
|
||||
require('moment/locale/' + language.momentLocale);
|
||||
moment.locale(language.momentLocale);
|
||||
require(`dayjs/locale/${language.locale}.js`);
|
||||
dayjs.locale(language.locale);
|
||||
|
||||
const [primaryColor, setPrimaryColor] = useState<MantineTheme['primaryColor']>(
|
||||
props.pageProps.primaryColor ?? 'red'
|
||||
|
||||
Reference in New Issue
Block a user