Skip to content

Commit

Permalink
PR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
daisykucharski committed Mar 14, 2024
1 parent fe090b4 commit 5643f93
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/frontend/components/Sidebar/NUPathSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface NUPathSectionProps {
loading?: boolean;
}
const nuPathDisplayAndAbbr: [
nupath: string,
nupath: NUPathEnum,
displayName: string,
abbreviation: string
][] = [
Expand Down Expand Up @@ -58,11 +58,11 @@ const NUPathSection: React.FC<NUPathSectionProps> = ({
}
}

const wiCount = nupathMap[NUPathEnum.WI];
const wiCount = nupathMap[NUPathEnum.WI] || 0;

if (loading) {
validationStatus = SidebarValidationStatus.Loading;
} else if (Object.keys(nupathMap).length === 13 && wiCount && wiCount >= 2) {
} else if (Object.keys(nupathMap).length === 13 && wiCount >= 2) {
// Sidebar is complete if all 13 nupaths have been fulfilled (including 2 writing intensives)
validationStatus = SidebarValidationStatus.Complete;
}
Expand All @@ -83,8 +83,7 @@ const NUPathSection: React.FC<NUPathSectionProps> = ({
alignItems="flex-start"
color="dark.main"
fontWeight="bold"
py="md"
px="md"
p="md"
margin="0"
backgroundColor="neutral.50"
transition="background-color 0.25s ease"
Expand Down

0 comments on commit 5643f93

Please sign in to comment.