Skip to content

Commit

Permalink
Set showMenu to false when opening the transfer menu (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinWu098 authored Aug 29, 2023
1 parent 10a433f commit 4fe138b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion site/src/pages/RoadmapPage/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ const Header: FC<HeaderProps> = ({ courseCount, unitCount, saveRoadmap, missingP
const [showMenu, setShowMenu] = useState(false);

const buttons = <>
<Button variant={isMobile ? "primary" : 'light'} className={isMobile ? 'my-1' : "header-btn"} onClick={() => dispatch(setShowTransfer(true))}>
<Button
variant={isMobile ? "primary" : "light"}
className={isMobile ? "my-1" : "header-btn"}
onClick={() => {
setShowMenu(false);
dispatch(setShowTransfer(true));
}}
>
Transfer Credits
<ArrowLeftRight className="header-icon" />
</Button>
Expand Down

0 comments on commit 4fe138b

Please sign in to comment.