import { Route, Routes } from 'react-router-dom'; // components import PageNotFound from './pages/PageNotFound'; import Login from './pages/Login'; import ProtectedRoute from './components/ProtectedRoute'; import Dashboard from './pages/Dashboard'; import DashboardBeneficiario from './pages/DashboardBeneficiario'; import BandoViewBeneficiario from './pages/BandoViewBeneficiario'; import DefaultLayout from './layouts/DefaultLayout'; import Bandi from './pages/Bandi'; import BandoEdit from './pages/BandoEdit'; import BandoView from './pages/BandoView'; import BandoFormsEdit from './pages/BandoFormsEdit'; import BandoForms from './pages/BandoForms'; import BandoFormsPreview from './pages/BandoFormsPreview'; import BandoFlowEdit from './pages/BandoFlowEdit'; import Applications from './pages/Applications'; import BandoApplication from './pages/BandoApplication'; import Registration from './pages/Registration'; import BandiBeneficiario from './pages/BandiBeneficiario'; import LoginAdmin from './pages/LoginAdmin'; import Profile from './pages/Profile'; import ProfileCompany from './pages/ProfileCompany'; import Users from './pages/Users'; import AddCompany from './pages/AddCompany'; import ResetPassword from './pages/ResetPassword'; import DashboardInstructor from './pages/DashboardInstructor'; import ProfileBeneficiario from './pages/ProfileBeneficiario'; import Evaluations from './pages/Evaluations'; import EvaluationEdit from './pages/EvaluationEdit'; const routes = ({ role, chosenCompanyId }) => { return ( }> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role && chosenCompanyId > 0 ? : } {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> }/> }/> }/> }/> }/> ) }; export default routes;