-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dependabot/npm_and_yarn/compose/neurosynth…
…-frontend/fast-xml-parser-4.4.1
- Loading branch information
Showing
20 changed files
with
414 additions
and
74 deletions.
There are no files selected for viewing
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { Cancel } from '@mui/icons-material'; | ||
import ErrorOutlineIcon from '@mui/icons-material/ErrorOutline'; | ||
import { Box, IconButton } from '@mui/material'; | ||
import BaseNavigationStyles from 'pages/BaseNavigation/BaseNavigation.styles'; | ||
import { useState } from 'react'; | ||
|
||
const Downbanner: React.FC = () => { | ||
const shouldHide = !!localStorage.getItem('hide-dwonbanner'); | ||
const [hideBanner, setHideBanner] = useState(shouldHide); | ||
|
||
if (hideBanner) return <></>; | ||
|
||
return ( | ||
<Box | ||
sx={{ | ||
backgroundColor: 'secondary.main', | ||
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"> | ||
<ErrorOutlineIcon sx={{ mr: '1rem' }} /> | ||
Neurosynth-compose will be undergoing planned maintenance and will be offline on | ||
friday (Sep/06/2024) | ||
</Box> | ||
<IconButton | ||
onClick={() => { | ||
localStorage.setItem('hide-dwonbanner', 'true'); | ||
setHideBanner(true); | ||
}} | ||
sx={{ padding: 0, ':hover': { backgroundColor: 'secondary.light' } }} | ||
> | ||
<Cancel /> | ||
</IconButton> | ||
</Box> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default Downbanner; |
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
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
30 changes: 30 additions & 0 deletions
30
compose/neurosynth-frontend/src/hooks/useGoogleAnalytics.spec.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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { routeMapping } from './useGoogleAnalytics'; | ||
|
||
describe('useGoogleAnalytics', () => { | ||
test.each` | ||
path | expected | ||
${'/projects/g7VRaCLw3iZJ/curation'} | ${'curation page'} | ||
${'/projects/g7VRaCLw3iZJ/curation/import'} | ${'curation import page'} | ||
${'/projects/g7VRaCLw3iZJ/curation/import?pageOfResults=2'} | ${'curation import page'} | ||
${'/projects/g7VRaCLw3iZJ/extraction'} | ${'extraction page'} | ||
${'/projects/g7VRaCLw3iZJ/extraction/annotations'} | ${'annotations page'} | ||
${'/projects'} | ${'projects page'} | ||
${'/projects/g7VRaCLw3iZJ/project'} | ${'project page'} | ||
${'/projects/6zW6TJtzpFjr/meta-analyses'} | ${'project meta-analyses page'} | ||
${'/projects/98ZZj2vbpySw/meta-analyses/8K6KhGEfTy6H'} | ${'project meta-analysis page'} | ||
${'/projects/new/sleuth'} | ${'sleuth import page'} | ||
${'/base-studies'} | ${'base-studies page'} | ||
${'/meta-analyses'} | ${'meta-analyses page'} | ||
${'/meta-analyses/BdCib6uM3QDX'} | ${'meta-analysis page'} | ||
${'/base-studies/FSfE96JVaPuU/5neCyoMwEvrM'} | ${'base-study page'} | ||
${'/base-studies/FSfE96JVaPuU'} | ${'base-study page'} | ||
${'/projects/g7VRaCLw3iZJ/extraction/studies/v7RBrDFEbAC7/edit'} | ${'edit project study page'} | ||
${'/projects/g7VRaCLw3iZJ/extraction/studies/v7RBrDFEbAC7'} | ${'project study page'} | ||
${'/user-profile'} | ${'user profile page'} | ||
${'/forbidden'} | ${'forbidden page'} | ||
${'/termsandconditions'} | ${'terms and conditions page'} | ||
${'/not-found'} | ${'not found page'} | ||
`('transforms $path to $expected', ({ path, expected }) => { | ||
expect(routeMapping(path)).toEqual(expected); | ||
}); | ||
}); |
Oops, something went wrong.