Skip to content

Commit

Permalink
add new page
Browse files Browse the repository at this point in the history
  • Loading branch information
thieryw committed Jul 16, 2022
1 parent 824aac4 commit 418f4a1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/i18n.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const {
} = createI18nApi<
| typeof import ("pages/Home").i18n
| typeof import ("pages/PageExample").i18n
| typeof import ("pages/Page2Example").i18n
| typeof import ("App/Header").i18n
| typeof import ("App/Footer").i18n
| typeof import ("pages/FourOFour").i18n
Expand Down Expand Up @@ -111,6 +112,9 @@ export const {
"checkListElementDescription4": "Am finished rejoiced drawings so he elegance. Set lose dear upon had two its what seen.",
"checkListElementDescription5": "Am finished rejoiced drawings so he elegance. Set lose dear upon had two its what seen.",
"checkListElementDescription6": "Am finished rejoiced drawings so he elegance. Set lose dear upon had two its what seen."
},
"Page2Example": {
"Page2Title": "Page 2 Title"
}
},
/* spell-checker: disable */
Expand Down Expand Up @@ -200,6 +204,9 @@ export const {
"checkListElementDescription4": "Il remarquait et en survivants eclaireurs legerement qu. Animaux nos humains fer fut ramassa encourt.",
"checkListElementDescription5": "Il remarquait et en survivants eclaireurs legerement qu. Animaux nos humains fer fut ramassa encourt.",
"checkListElementDescription6": "Il remarquait et en survivants eclaireurs legerement qu. Animaux nos humains fer fut ramassa encourt.",
},
"Page2Example": {
"Page2Title": "Titre de la page 2"
}

}
Expand Down
13 changes: 13 additions & 0 deletions src/pages/Page2Example.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { memo } from "react";
import { declareComponentKeys, useTranslation } from "i18n";

export const Page2Example = memo(() => {
const { t } = useTranslation({ Page2Example })

return <h1>{t("Page2Title")}</h1>

});

export const { i18n } = declareComponentKeys<
| "Page2Title"
>()({ Page2Example })

0 comments on commit 418f4a1

Please sign in to comment.