Skip to content

Commit

Permalink
WI tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelaZQ1 committed Feb 8, 2024
1 parent f5063b0 commit a6211ab
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions packages/frontend/components/Sidebar/NUPathSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -220,9 +221,8 @@ const NUPathRequirement: React.FC<NUPathRequirementProps> = ({
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 (
<Flex my="xs" ml="xs" columnGap="xs">
Expand Down Expand Up @@ -259,10 +259,15 @@ const NUPathRequirement: React.FC<NUPathRequirementProps> = ({
boxSize="13px"
/>
</Box>
<Text fontSize="sm" as="b">
{abbreviation}
</Text>
<Text fontSize="sm">{nupath}</Text>
<Flex alignItems="center" columnGap="3xs">
<Text fontSize="sm" as="b">
{abbreviation}
</Text>
<Text fontSize="sm" mr="4xs">
{nupath}
</Text>
{isWI && <HelperToolTip label="Complete 2 Writing Intensive courses" />}
</Flex>
</Flex>
);
};
Expand Down

0 comments on commit a6211ab

Please sign in to comment.