Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maint 853 update baner with new townhall link #856

Merged
merged 4 commits into from
Nov 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 55 additions & 56 deletions compose/neurosynth-frontend/src/components/Downbanner.tsx
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;
Loading