Add translation for module, fix language changer

This commit is contained in:
ajnart
2022-08-25 11:07:25 +02:00
parent 53500ffabc
commit 2ad51411f5
42 changed files with 138 additions and 117 deletions

View File

@@ -10,6 +10,8 @@ import {
} from '@mantine/core';
import { NextLink } from '@mantine/next';
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
const useStyles = createStyles((theme) => ({
root: {
paddingTop: 80,
@@ -92,3 +94,12 @@ export default function Custom404() {
</Container>
);
}
export async function getStaticProps({ locale }: { locale: string }) {
return {
props: {
...(await serverSideTranslations(locale, ['404'])),
// Will be passed to the page component as props
},
};
}