File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
src/app/training/(dashboard) Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ export const TrainingSideNav: React.FC<TrainingSideNavProps> = ({ notifications
4444 } ,
4545 { title : 'Student Profile' , route : 'profile' } ,
4646 { title : 'Mentor Profile' , route : 'mentor' } ,
47+ { title : 'All Sessions' , route : 'all' } ,
4748 ] ,
4849 } ,
4950 ] }
Original file line number Diff line number Diff line change 1+ import { type NextPage } from 'next' ;
2+ import { fetchApi } from '@/utils/fetch' ;
3+ import { type TrainingSession } from '@/types/training' ;
4+ import { SessionsTable } from '../SessionsTable' ;
5+
6+ async function getTrainingSessions ( ) : Promise < TrainingSession [ ] > {
7+ return fetchApi (
8+ '/training/sessions/all/' ,
9+ { cache : 'no-store' } ,
10+ ) ;
11+ }
12+
13+ const AllSessions : NextPage = async ( ) => {
14+ const trainingSessions = await getTrainingSessions ( ) ;
15+
16+ return < SessionsTable data = { trainingSessions } /> ;
17+ } ;
18+
19+ export default AllSessions ;
You can’t perform that action at this time.
0 commit comments