From 7e3d11f0317add0996c2714e7434357b52ac8504 Mon Sep 17 00:00:00 2001 From: zant Date: Thu, 24 Oct 2024 16:31:10 +0200 Subject: [PATCH] feat: add redirect on home --- src/pages/admin/HomeAdmin.tsx | 7 ++----- src/routes/AppRouter.tsx | 2 ++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/pages/admin/HomeAdmin.tsx b/src/pages/admin/HomeAdmin.tsx index e1b15cc..140b8ab 100644 --- a/src/pages/admin/HomeAdmin.tsx +++ b/src/pages/admin/HomeAdmin.tsx @@ -1,10 +1,7 @@ -import { useTranslation } from 'react-i18next'; -import { Title } from '../../themed/title/Title'; +import { Navigate } from 'react-router-dom'; export function HomeAdmin() { - const { t } = useTranslation('translation'); - - return ; + return <Navigate to="my-city" />; } export default HomeAdmin; diff --git a/src/routes/AppRouter.tsx b/src/routes/AppRouter.tsx index 49c2e1b..bfa8ae0 100644 --- a/src/routes/AppRouter.tsx +++ b/src/routes/AppRouter.tsx @@ -26,6 +26,7 @@ import CreateSuccessPage from '../pages/auth/CreateSuccess'; import LoadUser from '../pages/loader/LoadUser'; import Loader from '../themed/loader/Loader'; import ProtectedRoute from './ProtectedRoute'; +import AppHome from '@/pages/AppHome'; // Create a React Query client const queryClient = new QueryClient({ @@ -42,6 +43,7 @@ const router = createBrowserRouter([ element: ( <ProtectedRoute> <PageLayout> + <AppHome /> <Outlet /> </PageLayout> </ProtectedRoute>