feat: add i18n with type safety

This commit is contained in:
Sonny
2024-04-30 00:36:13 +02:00
committed by Sonny
parent 31f22d382e
commit 2cc490b611
32 changed files with 706 additions and 30 deletions

View File

@@ -0,0 +1,18 @@
import styled from '@emotion/styled';
import { ReactNode } from 'react';
import BaseLayout from './_base_layout';
const DashboardLayoutStyle = styled.div(({ theme }) => ({
height: 'auto',
width: theme.media.small_desktop,
maxWidth: '100%',
padding: '0.75em 1em',
}));
const DashboardLayout = ({ children }: { children: ReactNode }) => (
<BaseLayout>
<DashboardLayoutStyle>{children}</DashboardLayoutStyle>
</BaseLayout>
);
export default DashboardLayout;

View File

@@ -11,6 +11,7 @@ const FormLayoutStyle = styled.div(({ theme }) => ({
width: theme.media.mobile,
maxWidth: '100%',
marginTop: '10em',
paddingInline: '1em',
display: 'flex',
gap: '0.75em',
flexDirection: 'column',
@@ -46,7 +47,7 @@ const FormLayout = ({
</Form>
{!disableHomeLink && (
// <Link href={categoryId ? `/?categoryId=${categoryId}` : '/'}>{t('common:back-home')}</Link>
<Link href={PATHS.APP}> Revenir à l'accueil</Link>
<Link href={PATHS.DASHBOARD}> Revenir à l'accueil</Link>
)}
</FormLayoutStyle>
</BaseLayout>