From 26310ed4259f7bb5eb354ef6be8da328c62798b8 Mon Sep 17 00:00:00 2001 From: Nicholas Lee Date: Wed, 20 Nov 2024 10:58:04 -0500 Subject: [PATCH 1/3] maint: updated banner with new tonwhall link --- compose/neurosynth-frontend/src/App.tsx | 4 ++-- .../src/components/Downbanner.tsx | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/compose/neurosynth-frontend/src/App.tsx b/compose/neurosynth-frontend/src/App.tsx index 7d791c8c..648491e8 100644 --- a/compose/neurosynth-frontend/src/App.tsx +++ b/compose/neurosynth-frontend/src/App.tsx @@ -9,7 +9,7 @@ import Navbar from "components/Navbar/Navbar"; import useGetToken from "./hooks/useGetToken"; import BaseNavigation from "pages/BaseNavigation/BaseNavigation"; import { useLocation } from "react-router-dom"; -import Downbanner from "components/Downbanner"; +import Banner from "components/Downbanner"; const queryClient = new QueryClient({ defaultOptions: { @@ -71,7 +71,7 @@ function App() { )} > - + diff --git a/compose/neurosynth-frontend/src/components/Downbanner.tsx b/compose/neurosynth-frontend/src/components/Downbanner.tsx index 078de858..d9ce58a0 100644 --- a/compose/neurosynth-frontend/src/components/Downbanner.tsx +++ b/compose/neurosynth-frontend/src/components/Downbanner.tsx @@ -4,10 +4,10 @@ import { Box, IconButton, Link } from "@mui/material"; import BaseNavigationStyles from "pages/BaseNavigation/BaseNavigation.styles"; import { useState } from "react"; -const localStorageDownBannerKey = "hide-downbanner-nov-6-2024"; +const localStorageBannerKey = "hide-banner-nov-20-2024"; -const Downbanner: React.FC = () => { - const shouldHide = !!localStorage.getItem(localStorageDownBannerKey); +const Banner: React.FC = () => { + const shouldHide = !!localStorage.getItem(localStorageBannerKey); const [hideBanner, setHideBanner] = useState(shouldHide); if (hideBanner) return <>; @@ -34,12 +34,12 @@ const Downbanner: React.FC = () => { > - Join us next Wednesday, November 13th at 19:00 ET for the inaugural + Join us next Wednesday, December 4th 2024 at 10:00 ET for the Neurosynth Compose Virtual Town Hall!{" "} Click here to register @@ -47,7 +47,7 @@ const Downbanner: React.FC = () => { { - localStorage.setItem(localStorageDownBannerKey, "true"); + localStorage.setItem(localStorageBannerKey, "true"); setHideBanner(true); }} sx={{ @@ -62,4 +62,4 @@ const Downbanner: React.FC = () => { ); }; -export default Downbanner; +export default Banner; From ecaa30f96f0257ea139f98a7d5ad0b2a71ed511f Mon Sep 17 00:00:00 2001 From: Nicholas Lee Date: Wed, 20 Nov 2024 10:59:42 -0500 Subject: [PATCH 2/3] fix: update hover color --- compose/neurosynth-frontend/src/components/Downbanner.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/neurosynth-frontend/src/components/Downbanner.tsx b/compose/neurosynth-frontend/src/components/Downbanner.tsx index d9ce58a0..b84a51c6 100644 --- a/compose/neurosynth-frontend/src/components/Downbanner.tsx +++ b/compose/neurosynth-frontend/src/components/Downbanner.tsx @@ -52,7 +52,7 @@ const Banner: React.FC = () => { }} sx={{ padding: 0, - ":hover": { backgroundColor: "secondary.light" }, + ":hover": { backgroundColor: "gray" }, }} > From c95d76f7750c73981f05e348ed055af887ba9ded Mon Sep 17 00:00:00 2001 From: Nicholas Lee Date: Wed, 20 Nov 2024 11:51:50 -0500 Subject: [PATCH 3/3] chore: linting --- .../src/components/Downbanner.tsx | 111 +++++++++--------- 1 file changed, 55 insertions(+), 56 deletions(-) diff --git a/compose/neurosynth-frontend/src/components/Downbanner.tsx b/compose/neurosynth-frontend/src/components/Downbanner.tsx index b84a51c6..9d13cb76 100644 --- a/compose/neurosynth-frontend/src/components/Downbanner.tsx +++ b/compose/neurosynth-frontend/src/components/Downbanner.tsx @@ -1,65 +1,64 @@ -import { Cancel } from "@mui/icons-material"; -import EmojiPeopleIcon from "@mui/icons-material/EmojiPeople"; -import { Box, IconButton, Link } from "@mui/material"; -import BaseNavigationStyles from "pages/BaseNavigation/BaseNavigation.styles"; -import { useState } from "react"; +import { Cancel } from '@mui/icons-material'; +import EmojiPeopleIcon from '@mui/icons-material/EmojiPeople'; +import { Box, IconButton, Link } from '@mui/material'; +import BaseNavigationStyles from 'pages/BaseNavigation/BaseNavigation.styles'; +import { useState } from 'react'; -const localStorageBannerKey = "hide-banner-nov-20-2024"; +const localStorageBannerKey = 'hide-banner-nov-20-2024'; const Banner: React.FC = () => { - const shouldHide = !!localStorage.getItem(localStorageBannerKey); - const [hideBanner, setHideBanner] = useState(shouldHide); + const shouldHide = !!localStorage.getItem(localStorageBannerKey); + const [hideBanner, setHideBanner] = useState(shouldHide); - if (hideBanner) return <>; + if (hideBanner) return <>; - return ( - - - - - Join us next Wednesday, December 4th 2024 at 10:00 ET for the - Neurosynth Compose Virtual Town Hall!{" "} - - Click here to register - - - { - localStorage.setItem(localStorageBannerKey, "true"); - setHideBanner(true); - }} - sx={{ - padding: 0, - ":hover": { backgroundColor: "gray" }, - }} + return ( + - - - - - ); + + + + Join us next Wednesday, December 4th 2024 at 10:00 ET for the Neurosynth Compose Virtual Town Hall!{' '} + + Click here to register + + + { + localStorage.setItem(localStorageBannerKey, 'true'); + setHideBanner(true); + }} + sx={{ + padding: 0, + ':hover': { backgroundColor: 'gray' }, + }} + > + + + + + ); }; export default Banner;