Skip to content

Commit

Permalink
Merge pull request #44 from socialappslab/feat/no-ticket/comments
Browse files Browse the repository at this point in the history
feat: add redirect on home
  • Loading branch information
zant authored Oct 29, 2024
2 parents 27a2254 + 7e3d11f commit 26be35b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/pages/admin/HomeAdmin.tsx
Original file line number Diff line number Diff line change
@@ -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 <Title type="page" label={t('home')} className="mb-8" />;
return <Navigate to="my-city" />;
}

export default HomeAdmin;
2 changes: 2 additions & 0 deletions src/routes/AppRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -42,6 +43,7 @@ const router = createBrowserRouter([
element: (
<ProtectedRoute>
<PageLayout>
<AppHome />
<Outlet />
</PageLayout>
</ProtectedRoute>
Expand Down

0 comments on commit 26be35b

Please sign in to comment.