-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Maint 853 update baner with new townhall link (#856)
* maint: updated banner with new tonwhall link * fix: update hover color * chore: linting
- Loading branch information
Showing
1 changed file
with
55 additions
and
56 deletions.
There are no files selected for viewing
111 changes: 55 additions & 56 deletions
111
compose/neurosynth-frontend/src/components/Downbanner.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ( | ||
<Box | ||
sx={{ | ||
backgroundColor: "primary.dark", | ||
color: "primary.contrastText", | ||
width: "100%", | ||
paddingY: "0.5rem", | ||
}} | ||
> | ||
<Box | ||
sx={[ | ||
BaseNavigationStyles.pagesContainer, | ||
{ | ||
marginY: "0", | ||
display: "flex", | ||
alignItems: "center", | ||
justifyContent: "space-between", | ||
}, | ||
]} | ||
> | ||
<Box display="flex" alignItems="center"> | ||
<EmojiPeopleIcon sx={{ mr: "1rem" }} /> | ||
Join us next Wednesday, December 4th 2024 at 10:00 ET for the | ||
Neurosynth Compose Virtual Town Hall!{" "} | ||
<Link | ||
color="primary.contrastText" | ||
sx={{ marginLeft: "4px" }} | ||
href="https://tally.so/r/nWePVR" | ||
target="_blank" | ||
> | ||
Click here to register | ||
</Link> | ||
</Box> | ||
<IconButton | ||
onClick={() => { | ||
localStorage.setItem(localStorageBannerKey, "true"); | ||
setHideBanner(true); | ||
}} | ||
sx={{ | ||
padding: 0, | ||
":hover": { backgroundColor: "gray" }, | ||
}} | ||
return ( | ||
<Box | ||
sx={{ | ||
backgroundColor: 'primary.dark', | ||
color: 'primary.contrastText', | ||
width: '100%', | ||
paddingY: '0.5rem', | ||
}} | ||
> | ||
<Cancel /> | ||
</IconButton> | ||
</Box> | ||
</Box> | ||
); | ||
<Box | ||
sx={[ | ||
BaseNavigationStyles.pagesContainer, | ||
{ | ||
marginY: '0', | ||
display: 'flex', | ||
alignItems: 'center', | ||
justifyContent: 'space-between', | ||
}, | ||
]} | ||
> | ||
<Box display="flex" alignItems="center"> | ||
<EmojiPeopleIcon sx={{ mr: '1rem' }} /> | ||
Join us next Wednesday, December 4th 2024 at 10:00 ET for the Neurosynth Compose Virtual Town Hall!{' '} | ||
<Link | ||
color="primary.contrastText" | ||
sx={{ marginLeft: '4px' }} | ||
href="https://tally.so/r/nWePVR" | ||
target="_blank" | ||
> | ||
Click here to register | ||
</Link> | ||
</Box> | ||
<IconButton | ||
onClick={() => { | ||
localStorage.setItem(localStorageBannerKey, 'true'); | ||
setHideBanner(true); | ||
}} | ||
sx={{ | ||
padding: 0, | ||
':hover': { backgroundColor: 'gray' }, | ||
}} | ||
> | ||
<Cancel /> | ||
</IconButton> | ||
</Box> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default Banner; |