import { Fragment, lazy, Suspense } from 'react'; import { Route, Routes } from 'react-router-dom' import Loading from './Components/Utils/Loading/Loading'; import { RoutesLinks } from './Routes'; import Layout from './Layout/app/Layout'; import Auth from './Pages/Auth/Page'; import EditAccount from './Pages/Account/EditAccount/EditAccount'; import { toast } from 'react-toastify'; const Page404 = lazy(() => import("./Layout/app/NotFoundPage")) const App = () => { return ( {/* 404 Page */} }> } /> {/* Login Page */} {/* }> } /> */} {/* route not in navigation */} {/* All Routes */} {RoutesLinks?.map((item: any, index: number) => ( if(item?.element){ } > {item?.element ?? "Please Add Element Props in Routes"} } /> }else{ item?.children?.map((item:any)=>{ return( } > {item?.element ?? "Please Add Element Props in Routes"} } /> ) }) } )) } ) } export default App