Skip to content

Commit

Permalink
Changed Routes according to the heirachy
Browse files Browse the repository at this point in the history
  • Loading branch information
Anish7-anish committed Mar 24, 2024
1 parent 9fde698 commit d7da1b7
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions src/App.tsx
Expand Up @@ -75,33 +75,34 @@ function App() {
],
},
{
path: "student_tasks/participants",
element: <Participants type="student_tasks" id={1} />,
path: "student_tasks/:typeId/participants",
element: <Participants type="student_tasks" />,
children: [
{
path: "new",
element: <ParticipantEditor mode="create" type="student_tasks" />,
loader: loadParticipantDataRolesAndInstitutions,
},
{
path: "edit/:id",
element: <ParticipantEditor mode="update" type="student_tasks" />,
loader: loadParticipantDataRolesAndInstitutions,
},
]
},
{
path: "courses/participants",
element: <Participants type="courses" id={1} />,
path: "courses/:typeId/participants",
element: <Participants type="courses" />,
children: [
{
path: "new",
element: <ParticipantEditor mode="create" type="courses" />,
loader: loadParticipantDataRolesAndInstitutions,
},
],
},
{
path: "assignments/:typeId/participants",
element: <Participants type="assignments" />,
children: [
{
path: "edit/:id",
element: <ParticipantEditor mode="update" type="courses" />,
path: "new",
element: <ParticipantEditor mode="create" type="assignments" />,
loader: loadParticipantDataRolesAndInstitutions,
},
],
Expand Down Expand Up @@ -206,4 +207,4 @@ function App() {
return <RouterProvider router={router} />;
}

export default App;
export default App;

0 comments on commit d7da1b7

Please sign in to comment.