feat: 404 page redirect with toast added

This commit is contained in:
مهرزاد قدرتی
2025-08-20 14:33:15 +03:30
parent 58c044542a
commit 32433c9a2c
5 changed files with 43 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
import { Layout } from '@/components';
import { NavigateWithToast } from '@/components/NavigateWithToast';
import { AccountCreatedPage } from '@/features/authorization/routes/AccountCreatedPage';
import {
Calendar,
@@ -65,6 +66,17 @@ export interface RouteConfig {
// can lazy load component if needed (ex. lazy(() => import('@/features/home/routes/HomePage'));)
export const appRoutes: RouteConfig[] = [
{
path: '*',
element: (
<NavigateWithToast
to="/setting/profile"
replace
message="messages.pageNotFound"
severity="error"
/>
),
},
{
path: '/',
element: <Navigate to="/setting/profile" replace />,