Skip to content

Commit

Permalink
added participant routes for dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
shruthi-monika committed Sep 23, 2024
1 parent c216132 commit 4823502
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/features/default/src/Layout/Participant.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const SupportView = lazy(() => import("../Components/Support_New/SupportView"));
const DashboardNew = lazy(() => import("../Views/Dashboard/DashboardNew"));
const StreamlitFrame = lazy(() => import("../Views/Pages/Dashboard/streamlit"));
const TempFile = lazy(() => import("../Views/GuestUser/TempFarmerFile"));
const DaFile = lazy(() => import("../Views/GuestUser/TempDaRegistryFile"));
const Resources = lazy(() => import("../Views/Resources/Resources"));
const AddResource = lazy(() => import("../Views/Resources/AddResource"));
const EditResource = lazy(() => import("../Views/Resources/EditResource"));
Expand Down Expand Up @@ -297,7 +298,17 @@ function Participant(props) {
<Route
exact
path="/participant/dashboards/:name"
component={TempFile}
render={(props) => {
const { name } = props.match.params;

if (name === "farmer_registry_dashboard") {
return <TempFile />;
} else if (name === "da_registry_dashboard") {
return <DaFile />;
} else {
return <NotFound />;
}
}}
/>
<Route
exact
Expand Down

0 comments on commit 4823502

Please sign in to comment.