2
0

🌐 Introduce i18n

Only translate dashboard page for now

Closes #322
This commit is contained in:
Baptiste Arnaud
2023-03-11 11:05:07 +01:00
parent 8df830721c
commit 138f3f8b07
24 changed files with 237 additions and 183 deletions

View File

@ -1,6 +1,7 @@
import { Seo } from '@/components/Seo'
import { DashboardHeader } from '@/features/dashboard'
import { useToast } from '@/hooks/useToast'
import { useI18n } from '@/locales'
import { Stack, Flex, Spinner } from '@chakra-ui/react'
import { useRouter } from 'next/router'
import { useFolder } from '../hooks/useFolder'
@ -8,6 +9,7 @@ import { TypebotDndProvider } from '../TypebotDndProvider'
import { FolderContent } from './FolderContent'
export const FolderPage = () => {
const t = useI18n()
const router = useRouter()
const { showToast } = useToast()
@ -16,7 +18,6 @@ export const FolderPage = () => {
folderId: router.query.id?.toString(),
onError: (error) => {
showToast({
title: "Couldn't fetch folder content",
description: error.message,
})
},
@ -24,7 +25,7 @@ export const FolderPage = () => {
return (
<Stack minH="100vh">
<Seo title="My typebots" />
<Seo title={t('dashboard.title')} />
<DashboardHeader />
<TypebotDndProvider>
{!folder ? (