Skip to content

Commit 359f507

Browse files
Rachel LimRachel Lim
authored andcommitted
add fundraiser section to header nav
1 parent d994bd2 commit 359f507

File tree

1 file changed

+19
-0
lines changed
  • client/modules/IDE/components/Header

1 file changed

+19
-0
lines changed

client/modules/IDE/components/Header/Nav.jsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
newFile,
2525
newFolder,
2626
showKeyboardShortcutModal,
27+
showFundraiserModal,
2728
startSketch,
2829
stopSketch
2930
} from '../../actions/ide';
@@ -37,6 +38,7 @@ const Nav = ({ layout }) => (
3738
matches ? (
3839
<NavBar>
3940
<LeftLayout layout={layout} />
41+
<FundraiserSection />
4042
<UserMenu />
4143
</NavBar>
4244
) : (
@@ -85,6 +87,23 @@ const UserMenu = () => {
8587
return null;
8688
};
8789

90+
const FundraiserSection = () => {
91+
const dispatch = useDispatch();
92+
93+
return (
94+
<>
95+
<button
96+
className="nav__fundraiser-btn"
97+
onClick={() => dispatch(showFundraiserModal())}
98+
aria-label="2023-fundraiser-button"
99+
title="2023 Fundraiser Button"
100+
>
101+
Celebrate a Decade of Code and Support p5.js!
102+
</button>
103+
</>
104+
);
105+
};
106+
88107
const DashboardMenu = () => {
89108
const { t } = useTranslation();
90109
const editorLink = useSelector(selectSketchPath);

0 commit comments

Comments
 (0)