From 4695c3b01539996cc1e702356325ad4723239a42 Mon Sep 17 00:00:00 2001 From: Gabriel Ting <65492346+gtangelo@users.noreply.github.com> Date: Sun, 10 Apr 2022 03:50:03 +1000 Subject: [PATCH] fixed validation to display hazard icon for tp and align to left --- frontend/src/pages/TermPlanner/DraggableCourse.jsx | 2 +- frontend/src/pages/TermPlanner/main.less | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/TermPlanner/DraggableCourse.jsx b/frontend/src/pages/TermPlanner/DraggableCourse.jsx index d53c23f26..bc92b4965 100644 --- a/frontend/src/pages/TermPlanner/DraggableCourse.jsx +++ b/frontend/src/pages/TermPlanner/DraggableCourse.jsx @@ -24,7 +24,7 @@ function DraggableCourse({ code, index }) { const warningMessage = courses.get(code)["warnings"]; const warning1 = isLegacy || !isUnlocked; - const warning2 = handbook_note !== "" || warningMessage !== ""; + const warning2 = handbook_note !== "" || !!warningMessage.length; const { show } = useContextMenu({ id: `${code}-context`, diff --git a/frontend/src/pages/TermPlanner/main.less b/frontend/src/pages/TermPlanner/main.less index 4b9946354..64dbc328e 100644 --- a/frontend/src/pages/TermPlanner/main.less +++ b/frontend/src/pages/TermPlanner/main.less @@ -90,7 +90,7 @@ body { min-width: 12em; margin-top: 1em; display: flex; - justify-content: center; + justify-content: flex-start; gap: 0.7em; align-items: center;