Skip to content

Commit 0b919cd

Browse files
committed
days show correctly on calendar
1 parent 80447d9 commit 0b919cd

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

client/src/pages/schedule.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
import { useRouter } from "next/router";
12
import { useEffect, useState } from "react";
23

34
import Timetable, {
45
getDurationMinutes,
56
resizeAndPositionTimetableElements,
67
} from "@/components/timetable";
78
import { TimetableTaskProps } from "@/components/timetable_task";
8-
import { useRouter } from "next/router";
99

1010
/*
1111
Database representation of Time.
@@ -46,7 +46,7 @@ interface Task {
4646
Used to convert database representation of a day to string used by front end.
4747
*/
4848
enum 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
6060
assigned.
6161
*/
6262
function 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

Comments
 (0)