import { Routes, Route } from 'react-router-dom'; import type { ReactElement } from 'react'; import NotFound from '@/pages/NotFound'; import ProtectedRoute from '@/pages/ProtectedRoute'; import TenantProtectedRoute from '@/pages/TenantProtectedRoute'; import { publicRoutes } from './public-routes'; import { superAdminRoutes } from './super-admin-routes'; import { tenantAdminRoutes } from './tenant-admin-routes'; // App Routes Component export const AppRoutes = (): ReactElement => { return ( {/* Public Routes */} {publicRoutes.map((route) => ( ))} {/* Super Admin Routes */} {superAdminRoutes.map((route) => ( {route.element}} /> ))} {/* Tenant Admin Routes */} {tenantAdminRoutes.map((route) => ( {route.element}} /> ))} {/* 404 - Catch all route */} } /> ); };