diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index e8c1fbba..f16e7f5d 100644 --- a/src/frontend/src/App.tsx +++ b/src/frontend/src/App.tsx @@ -5,7 +5,7 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import { useTranslation } from 'react-i18next' import { useLang } from 'hoofd' import { Route, Switch } from 'wouter' -import { Home } from './routes/Home' +import { HomeRoute } from '@/features/home' import { NotFound } from './routes/NotFound' import { RoomRoute } from '@/features/rooms' import './i18n/init' @@ -18,7 +18,7 @@ function App() { return ( - + diff --git a/src/frontend/src/features/home/index.ts b/src/frontend/src/features/home/index.ts new file mode 100644 index 00000000..0d677a0d --- /dev/null +++ b/src/frontend/src/features/home/index.ts @@ -0,0 +1,2 @@ +export { navigateToHome } from './navigation/navigateToHome' +export { Home as HomeRoute } from './routes/Home' diff --git a/src/frontend/src/navigation/navigateToHome.ts b/src/frontend/src/features/home/navigation/navigateToHome.ts similarity index 100% rename from src/frontend/src/navigation/navigateToHome.ts rename to src/frontend/src/features/home/navigation/navigateToHome.ts diff --git a/src/frontend/src/routes/Home.tsx b/src/frontend/src/features/home/routes/Home.tsx similarity index 91% rename from src/frontend/src/routes/Home.tsx rename to src/frontend/src/features/home/routes/Home.tsx index 1deb7006..37e14702 100644 --- a/src/frontend/src/routes/Home.tsx +++ b/src/frontend/src/features/home/routes/Home.tsx @@ -5,11 +5,11 @@ import { navigateToNewRoom } from '@/features/rooms' import { Screen } from '@/layout/Screen' export const Home = () => { - const { t } = useTranslation(undefined, { keyPrefix: 'homepage' }) + const { t } = useTranslation('home') const { isLoggedIn } = useUser() return ( - + {t('heading')}

{t('intro')}

diff --git a/src/frontend/src/features/rooms/components/Conference.tsx b/src/frontend/src/features/rooms/components/Conference.tsx index 18c6e963..67f2e1d3 100644 --- a/src/frontend/src/features/rooms/components/Conference.tsx +++ b/src/frontend/src/features/rooms/components/Conference.tsx @@ -7,7 +7,7 @@ import { } from '@livekit/components-react' import { keys } from '@/api/queryKeys' import { QueryAware } from '@/layout/QueryAware' -import { navigateToHome } from '@/navigation/navigateToHome' +import { navigateToHome } from '@/features/home' import { fetchRoom } from '../api/fetchRoom' export const Conference = ({ diff --git a/src/frontend/src/locales/de/global.json b/src/frontend/src/locales/de/global.json index fc9d2e1a..733a3f49 100644 --- a/src/frontend/src/locales/de/global.json +++ b/src/frontend/src/locales/de/global.json @@ -12,13 +12,5 @@ "loading": "", "notFound": { "heading": "" - }, - "homepage": { - "heading": "", - "intro": "", - "createMeeting": "", - "login": "", - "or": "", - "copyMeetingUrl": "" } } diff --git a/src/frontend/src/locales/de/home.json b/src/frontend/src/locales/de/home.json new file mode 100644 index 00000000..8590c7be --- /dev/null +++ b/src/frontend/src/locales/de/home.json @@ -0,0 +1,8 @@ +{ + "heading": "", + "intro": "", + "createMeeting": "", + "login": "", + "or": "", + "copyMeetingUrl": "" +} diff --git a/src/frontend/src/locales/en/global.json b/src/frontend/src/locales/en/global.json index 74d2d31d..66686d63 100644 --- a/src/frontend/src/locales/en/global.json +++ b/src/frontend/src/locales/en/global.json @@ -12,13 +12,5 @@ "loading": "Loading…", "notFound": { "heading": "" - }, - "homepage": { - "heading": "Welcome in Meet", - "intro": "What do you want to do? You can either:", - "createMeeting": "Create a conference call", - "login": "Login to create a conference call", - "or": "Or", - "copyMeetingUrl": "copy a meeting URL in your browser address bar to join an existing conference call" } } diff --git a/src/frontend/src/locales/en/home.json b/src/frontend/src/locales/en/home.json new file mode 100644 index 00000000..7f635761 --- /dev/null +++ b/src/frontend/src/locales/en/home.json @@ -0,0 +1,8 @@ +{ + "heading": "Welcome in Meet", + "intro": "What do you want to do? You can either:", + "createMeeting": "Create a conference call", + "login": "Login to create a conference call", + "or": "Or", + "copyMeetingUrl": "copy a meeting URL in your browser address bar to join an existing conference call" +} diff --git a/src/frontend/src/locales/fr/global.json b/src/frontend/src/locales/fr/global.json index 6dac8681..297c2fc5 100644 --- a/src/frontend/src/locales/fr/global.json +++ b/src/frontend/src/locales/fr/global.json @@ -12,13 +12,5 @@ "loading": "Chargement…", "notFound": { "heading": "Page introuvable" - }, - "homepage": { - "heading": "Bienvenue dans Meet", - "intro": "Que voulez vous faire ? Vous pouvez :", - "createMeeting": "Créer une conférence", - "login": "Vous connecter pour créer une conférence", - "or": "Ou", - "copyMeetingUrl": "copier une URL de conférence dans votre barre d'adresse pour rejoindre une conférence existante" } } diff --git a/src/frontend/src/locales/fr/home.json b/src/frontend/src/locales/fr/home.json new file mode 100644 index 00000000..e8893f1c --- /dev/null +++ b/src/frontend/src/locales/fr/home.json @@ -0,0 +1,8 @@ +{ + "heading": "Bienvenue dans Meet", + "intro": "Que voulez vous faire ? Vous pouvez :", + "createMeeting": "Créer une conférence", + "login": "Vous connecter pour créer une conférence", + "or": "Ou", + "copyMeetingUrl": "copier une URL de conférence dans votre barre d'adresse pour rejoindre une conférence existante" +}