Skip to content

Commit

Permalink
renderDropdownWarning (#737)
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelaZQ1 authored Apr 11, 2024
1 parent f1cfc40 commit 7a5ee03
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/frontend/components/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ export const NoMajorSidebar: React.FC<NoMajorSidebarProps> = ({
title="No Major"
creditsTaken={creditsTaken}
renderCoopBlock
renderDropdownWarning={false}
>
<Stack px="md">
<Text>
Expand Down Expand Up @@ -290,6 +291,7 @@ interface SidebarContainerProps {
creditsToTake?: number;
renderCoopBlock?: boolean;
renderBetaMajorBlock?: boolean;
renderDropdownWarning?: boolean;
}

export const NoPlanSidebar: React.FC = () => {
Expand All @@ -303,6 +305,7 @@ const SidebarContainer: React.FC<PropsWithChildren<SidebarContainerProps>> = ({
creditsToTake,
renderCoopBlock,
renderBetaMajorBlock,
renderDropdownWarning = true,
children,
}) => {
return (
Expand Down Expand Up @@ -348,7 +351,7 @@ const SidebarContainer: React.FC<PropsWithChildren<SidebarContainerProps>> = ({
</Text>
)}
</Box>
<DropdownWarning />
{renderDropdownWarning && <DropdownWarning />}
{creditsTaken !== undefined && (
<Flex mb="sm" alignItems="baseline" columnGap="xs">
<Text
Expand Down

0 comments on commit 7a5ee03

Please sign in to comment.