Skip to content

Commit

Permalink
Fix 404 page translations (#890)
Browse files Browse the repository at this point in the history
  • Loading branch information
evroon committed Sep 7, 2024
1 parent 5d59fdc commit 120fbee
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions frontend/src/pages/404.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Button, Container, Group, Text, Title } from '@mantine/core';
import { GetStaticProps } from 'next';
import { SSRConfig, i18n as globali18n, useTranslation } from 'next-i18next';
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
import { useRouter } from 'next/router';
import { useEffect, useState } from 'react';

import classes from './404.module.css';
import { getStaticProps } from './index';

export default function NotFoundTitle(props: SSRConfig) {
const router = useRouter();
Expand Down Expand Up @@ -40,5 +41,9 @@ export default function NotFoundTitle(props: SSRConfig) {
</Container>
);
}

export { getStaticProps };
type Props = {};
export const getStaticProps: GetStaticProps<Props> = async ({ locale }) => ({
props: {
...(await serverSideTranslations(locale ?? 'en', ['common'])),
},
});

0 comments on commit 120fbee

Please sign in to comment.