Teachers will have a link in the navigation header to take them to the page with a list of all cohorts, so that they can manage the cohorts.
With this issue we prepare the skeleton for this feature.
Defining the Route
Add the route in App.js as a nested route inside the: <Route element={}>, like it has been done for the /posts route.
The route's path should be /cohorts
The route should instantiate the CohortsPage component and pass the loggedInUser as props.
NOTE: we may want to define a function similar to <AuthenticateUser> but called AuthenticateTeacherUser that checks a) if we have a logged in user and b) that they are a TEACHER. In case they are not teachers, we redirect them to home page. We would then nest our /cohorts Route inside this component, to ensure only teachers can access this page.
CohortsPage component
Add the component in the /scr/components/cohorts folder (to be created) as CohortsPage.js
Any styles specific to this component go in a styles.css in the same folder.
At the moment this component just renders a blank page.
Teachers will have a link in the navigation header to take them to the page with a list of all cohorts, so that they can manage the cohorts.
With this issue we prepare the skeleton for this feature.
Defining the Route
Add the route in App.js as a nested route inside the: <Route element={ }>, like it has been done for the /posts route.
The route's path should be /cohorts
The route should instantiate the CohortsPage component and pass the
loggedInUser
as props.NOTE: we may want to define a function similar to
<AuthenticateUser>
but calledAuthenticateTeacherUser
that checks a) if we have a logged in user and b) that they are a TEACHER. In case they are not teachers, we redirect them to home page. We would then nest our/cohorts
Route inside this component, to ensure only teachers can access this page.CohortsPage component
Add the component in the
/scr/components/cohorts
folder (to be created) asCohortsPage.js
Any styles specific to this component go in a
styles.css
in the same folder.At the moment this component just renders a blank page.