From a6211ab25a954deb56f24904781ebc26ccb865dd Mon Sep 17 00:00:00 2001 From: AngelaZQ1 Date: Thu, 8 Feb 2024 17:25:30 -0500 Subject: [PATCH] WI tooltip --- .../components/Sidebar/NUPathSection.tsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/frontend/components/Sidebar/NUPathSection.tsx b/packages/frontend/components/Sidebar/NUPathSection.tsx index 48d37390f..06002fe49 100644 --- a/packages/frontend/components/Sidebar/NUPathSection.tsx +++ b/packages/frontend/components/Sidebar/NUPathSection.tsx @@ -2,6 +2,7 @@ import { NUPathEnum, ScheduleCourse2 } from "@graduate/common"; import { SidebarValidationStatus } from "./Sidebar"; import { useState } from "react"; import { Box, Flex, Spinner, Text } from "@chakra-ui/react"; +import { HelperToolTip } from "../Help"; import { CheckIcon, ChevronDownIcon, @@ -220,9 +221,8 @@ const NUPathRequirement: React.FC = ({ nupath, numTaken, }) => { - const isSatisfied = - (nupath === NUPathEnum.WI && numTaken >= 2) || - (nupath !== NUPathEnum.WI && numTaken >= 1); + const isWI = nupath === NUPathEnum.WI; + const isSatisfied = (isWI && numTaken >= 2) || (!isWI && numTaken >= 1); return ( @@ -259,10 +259,15 @@ const NUPathRequirement: React.FC = ({ boxSize="13px" /> - - {abbreviation} - - {nupath} + + + {abbreviation} + + + {nupath} + + {isWI && } + ); };