We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8733146 commit 726e3d4Copy full SHA for 726e3d4
frontend/src/components/Timetable.tsx
@@ -16,6 +16,7 @@ const Timetable: React.FC<props> = ({ file }) => {
16
e: React.MouseEvent<HTMLButtonElement, MouseEvent>
17
) => {
18
e.preventDefault();
19
+ setLoading(true);
20
const formData = new URLSearchParams();
21
formData.append("roll_number", user.rollNo);
22
@@ -60,9 +61,12 @@ const Timetable: React.FC<props> = ({ file }) => {
60
61
document.body.appendChild(a);
62
a.click();
63
a.remove();
64
+
65
+ setLoading(false);
66
} catch (error) {
67
toast.error(`Error fetching timetable!`);
68
console.error("Error fetching timetable", error);
69
70
} finally {
71
setLoading(false);
72
}
0 commit comments