1+ import { useRouter } from "next/router" ;
12import { useEffect , useState } from "react" ;
23
34import Timetable , {
45 getDurationMinutes ,
56 resizeAndPositionTimetableElements ,
67} from "@/components/timetable" ;
78import { TimetableTaskProps } from "@/components/timetable_task" ;
8- import { useRouter } from "next/router" ;
99
1010/*
1111Database representation of Time.
@@ -46,7 +46,7 @@ interface Task {
4646Used to convert database representation of a day to string used by front end.
4747*/
4848enum Day {
49- Monday = 0 ,
49+ Monday = 1 ,
5050 Tuesday ,
5151 Wednesday ,
5252 Thursday ,
@@ -60,7 +60,6 @@ Page containing a Timetable to visually represent the times that tasks have been
6060assigned.
6161*/
6262function Schedule ( ) {
63-
6463 const router = useRouter ( ) ;
6564 const [ timetableTasksProps , setTimetableTasksProps ] = useState <
6665 TimetableTaskProps [ ]
@@ -85,7 +84,6 @@ function Schedule() {
8584 to be displayed. Sets the timetableTasksProps State variable once finished.
8685 */
8786 async function fetchTasks ( ) {
88-
8987 try {
9088 const token = localStorage . getItem ( "access" ) ;
9189 if ( ! token ) {
@@ -299,7 +297,7 @@ function Schedule() {
299297 to run in an infinite loop. */
300298
301299 return (
302- < div className = "content-container min-w-screen h-[calc(100vh-64px)] flex w-full flex-col bg-slate-800 justify-center items-center p-3" >
300+ < div className = "content-container min-w-screen flex h-[calc(100vh-64px)] w-full flex-col items-center justify-center bg-slate-800 p-3" >
303301 < div className = "timetable-container max-h-[90vh] w-full p-3" >
304302 < Timetable timetable_tasks_props = { timetableTasksProps } />
305303 </ div >
0 commit comments