import React, { useEffect } from "react"; import { BrowserRouter, Route, Switch } from "react-router-dom"; import NotFound404Page from "./components/status-pages/NotFound404Page"; import TestPage from "./components/status-pages/TestPage"; import Configuration from "./shared/configuration/Configuration"; import AppContainer from "./components/layout/AppContainer"; import ActivityPage from "./containers/activity-page/ActivityPage"; import ActivityDetailPage from "./containers/activity-detail-page/ActivityDetailPage"; import DepartmentGoalsPage from "./containers/goals/department/DepartmentGoalsPage"; import PersonnelGoalsPage from "./containers/goals/personnel/PersonnelGoalsPage"; import OrganizationView from "./containers/organization-view/OrganizationView"; import { useDispatch } from "react-redux"; import RoleManagement from "./containers/role-management/RoleMangement"; import PayoutProfilePage from "./containers/payout-profile/PayoutProfilePage"; import CommissionsPage from "./containers/commissions-page/CommissionsPage"; import ProfileSearchPage from "./containers/profile/ProfileSearchPage"; import ProfileSelector from "./containers/profile/ProfileSelector"; import { refreshProfile } from "./actions/ProfileActions"; import ExportPayoutPage from "./containers/payouts/ExportPayoutPage"; import DashboardPage from "./containers/dashboard/DashboardPage"; import ActivityFormPage from "./containers/activity-form-page/ActivityFormPage"; import { SettingsProvider } from "./shared/providers/SettingsProvider"; import DepartmentDetailPage from "./containers/department-detail-page/DepartmentDetailPage"; import PermissionGuard from "./containers/shared/PermissionGuard"; import EndOfEmploymentPage from "./containers/eoe-list/EndOfEmploymentPage"; import DeadActivityPage from "./containers/dead-activity-page/DeadActivityPage"; import RoleMappingPage from "./containers/role-mapping-page/RoleMappingPage"; import ReportPage from "./containers/report-page/ReportPage"; const App: React.FC = () => { const dispatch = useDispatch(); useEffect(() => { dispatch(refreshProfile()); }, []); return ( //Normally we use Connected Router which requires has. React-Dom router does not require a hash. } /> } /> { return ( ); }} /> { return ( ); }} /> { return ( ); }} /> { return ( ); }} /> } /> { return ( ); }} /> { return ( ); }} /> { return ( ); }} /> { return ( ); }} /> { return ( ); }} /> } /> } /> { return ( ); }} /> ( )} /> ( )} /> ( )} /> { return ( ); }} /> { return ( ); }} /> ( )} /> ); }; export default App;