Skip to content

Commit 2081b38

Browse files
committed
chore: merge master
2 parents 465a8ff + 71d9f1d commit 2081b38

File tree

6 files changed

+148
-145
lines changed

6 files changed

+148
-145
lines changed

.github/workflows/workflow.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,13 @@ jobs:
4343
password: ${{ secrets.GITHUB_TOKEN }}
4444
-
4545
name: Build and push
46-
uses: docker/bake-action@master
46+
uses: docker/bake-action@v6.0.0
4747
with:
4848
files: docker-compose.yml,docker-compose.dev.yml
4949
push: true
5050
load: false
5151
workdir: compose
52+
source: "{{defaultContext}}:compose"
5253
set: |
5354
compose.tags=ghcr.io/${{ github.repository_owner }}/neurosynth_compose:${{ hashFiles('**/compose/neurosynth_compose/**') }}
5455
compose.cache-from=type=registry,ref=ghcr.io/${{ github.repository_owner }}/neurosynth_compose:${{ hashFiles('**/compose/neurosynth_compose/**') }}
@@ -94,12 +95,13 @@ jobs:
9495
password: ${{ secrets.GITHUB_TOKEN }}
9596
-
9697
name: Build and push
97-
uses: docker/bake-action@master
98+
uses: docker/bake-action@v6.0.0
9899
with:
99100
files: docker-compose.yml,docker-compose.dev.yml
100101
push: true
101102
load: false
102103
workdir: store
104+
source: "{{defaultContext}}:store"
103105
set: |
104106
neurostore.tags=ghcr.io/${{ github.repository_owner }}/neurostore:${{ hashFiles('**/store/neurostore/**') }}
105107
neurostore.cache-from=type=registry,ref=ghcr.io/${{ github.repository_owner }}/neurostore:${{ hashFiles('**/store/neurostore/**') }}
@@ -136,12 +138,13 @@ jobs:
136138
cp .env.example .env
137139
-
138140
name: load images
139-
uses: docker/bake-action@master
141+
uses: docker/bake-action@v6.0.0
140142
with:
141143
files: docker-compose.yml,docker-compose.dev.yml
142144
push: false
143145
load: true
144146
workdir: store
147+
source: "{{defaultContext}}:store"
145148
set: |
146149
neurostore.cache-from=type=gha,scope=cached-neurostore
147150
store_nginx.cache-from=type=gha,scope=cached-store-nginx
@@ -205,12 +208,13 @@ jobs:
205208
cp .env.example .env
206209
-
207210
name: load images
208-
uses: docker/bake-action@master
211+
uses: docker/bake-action@v6.0.0
209212
with:
210213
files: docker-compose.yml,docker-compose.dev.yml
211214
push: false
212215
load: true
213216
workdir: compose
217+
source: "{{defaultContext}}:compose"
214218
set: |
215219
compose.cache-from=type=gha,scope=cached-compose
216220
compose_nginx.cache-from=type=gha,scope=cached-compose-nginx
@@ -295,12 +299,13 @@ jobs:
295299
cp .env.example .env
296300
-
297301
name: load images
298-
uses: docker/bake-action@master
302+
uses: docker/bake-action@v6.0.0
299303
with:
300304
files: docker-compose.yml,docker-compose.dev.yml
301305
push: false
302306
load: true
303307
workdir: compose
308+
source: "{{defaultContext}}:compose"
304309
set: |
305310
compose.cache-from=type=gha,scope=cached-compose
306311
compose_nginx.cache-from=type=gha,scope=cached-compose-nginx
@@ -378,25 +383,27 @@ jobs:
378383
cp store/.env.example store/.env
379384
-
380385
name: load compose images
381-
uses: docker/bake-action@master
386+
uses: docker/bake-action@v6.0.0
382387
with:
383388
files: docker-compose.yml,docker-compose.dev.yml
384389
push: false
385390
load: true
386391
workdir: compose
392+
source: "{{defaultContext}}:compose"
387393
set: |
388394
compose.cache-from=type=gha,scope=cached-compose
389395
compose_nginx.cache-from=type=gha,scope=cached-compose-nginx
390396
compose_pgsql.cache-from=type=gha,scope=cached-compose-pgsql
391397
compose_worker.cache-from=type=gha,scope=cached-compose-worker
392398
-
393399
name: load store images
394-
uses: docker/bake-action@master
400+
uses: docker/bake-action@v6.0.0
395401
with:
396402
files: docker-compose.yml,docker-compose.dev.yml
397403
push: false
398404
load: true
399405
workdir: store
406+
source: "{{defaultContext}}:store"
400407
set: |
401408
neurostore.cache-from=type=gha,scope=cached-neurostore
402409
store_nginx.cache-from=type=gha,scope=cached-store-nginx

compose/neurosynth-frontend/package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 63 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,79 @@
1-
import Close from "@mui/icons-material/Close";
2-
import { IconButton } from "@mui/material";
3-
import { AxiosError } from "axios";
4-
import useGoogleAnalytics from "hooks/useGoogleAnalytics";
5-
import { SnackbarKey, SnackbarProvider } from "notistack";
6-
import { useEffect, useRef } from "react";
7-
import { QueryCache, QueryClient, QueryClientProvider } from "react-query";
8-
import Navbar from "components/Navbar/Navbar";
9-
import useGetToken from "./hooks/useGetToken";
10-
import BaseNavigation from "pages/BaseNavigation/BaseNavigation";
11-
import { useLocation } from "react-router-dom";
12-
import Downbanner from "components/Downbanner";
1+
import Close from '@mui/icons-material/Close';
2+
import { IconButton } from '@mui/material';
3+
import { AxiosError } from 'axios';
4+
import useGoogleAnalytics from 'hooks/useGoogleAnalytics';
5+
import { SnackbarKey, SnackbarProvider } from 'notistack';
6+
import { useEffect, useRef } from 'react';
7+
import { QueryCache, QueryClient, QueryClientProvider } from 'react-query';
8+
import Navbar from 'components/Navbar/Navbar';
9+
import useGetToken from './hooks/useGetToken';
10+
import BaseNavigation from 'pages/BaseNavigation/BaseNavigation';
11+
import { useLocation } from 'react-router-dom';
1312

1413
const queryClient = new QueryClient({
15-
defaultOptions: {
16-
queries: {
17-
retry: 0,
18-
refetchOnWindowFocus: false,
19-
// staleTime: 5000, // https://tkdodo.eu/blog/practical-react-query#the-defaults-explained
14+
defaultOptions: {
15+
queries: {
16+
retry: 0,
17+
refetchOnWindowFocus: false,
18+
// staleTime: 5000, // https://tkdodo.eu/blog/practical-react-query#the-defaults-explained
19+
},
2020
},
21-
},
22-
queryCache: new QueryCache({
23-
onError: (error) => {
24-
console.log({ error });
25-
const responseStatus = (error as AxiosError)?.response?.status;
26-
if (responseStatus && responseStatus === 404) {
27-
console.error("could not find resource");
28-
}
29-
},
30-
}),
21+
queryCache: new QueryCache({
22+
onError: (error) => {
23+
console.log({ error });
24+
const responseStatus = (error as AxiosError)?.response?.status;
25+
if (responseStatus && responseStatus === 404) {
26+
console.error('could not find resource');
27+
}
28+
},
29+
}),
3130
});
3231

3332
declare global {
34-
interface Window {
35-
gtag?: (
36-
type: "event" | "config" | "get" | "set" | "consent",
37-
action: "login" | "page_view",
38-
options?: any
39-
) => void;
40-
}
33+
interface Window {
34+
gtag?: (
35+
type: 'event' | 'config' | 'get' | 'set' | 'consent',
36+
action: 'login' | 'page_view',
37+
options?: any
38+
) => void;
39+
}
4140
}
4241

4342
function App() {
44-
const notistackRef = useRef<SnackbarProvider>(null);
45-
useGetToken();
46-
useGoogleAnalytics();
43+
const notistackRef = useRef<SnackbarProvider>(null);
44+
useGetToken();
45+
useGoogleAnalytics();
4746

48-
const location = useLocation();
49-
useEffect(() => {
50-
if (window.gtag) {
51-
window.gtag("event", "page_view", {
52-
page_path: `${location.pathname}${location.search}`,
53-
});
54-
}
55-
}, [location]);
47+
const location = useLocation();
48+
useEffect(() => {
49+
if (window.gtag) {
50+
window.gtag('event', 'page_view', {
51+
page_path: `${location.pathname}${location.search}`,
52+
});
53+
}
54+
}, [location]);
5655

57-
const handleCloseSnackbar =
58-
(key: SnackbarKey) => (_event: React.MouseEvent) => {
59-
if (notistackRef?.current?.closeSnackbar)
60-
notistackRef.current?.closeSnackbar(key);
56+
const handleCloseSnackbar = (key: SnackbarKey) => (_event: React.MouseEvent) => {
57+
if (notistackRef?.current?.closeSnackbar) notistackRef.current?.closeSnackbar(key);
6158
};
6259

63-
return (
64-
<QueryClientProvider client={queryClient}>
65-
<SnackbarProvider
66-
ref={notistackRef}
67-
autoHideDuration={8000}
68-
action={(key) => (
69-
<IconButton onClick={handleCloseSnackbar(key)}>
70-
<Close sx={{ color: "white" }} />
71-
</IconButton>
72-
)}
73-
>
74-
<Downbanner />
75-
<Navbar />
76-
<BaseNavigation />
77-
</SnackbarProvider>
78-
</QueryClientProvider>
79-
);
60+
return (
61+
<QueryClientProvider client={queryClient}>
62+
<SnackbarProvider
63+
ref={notistackRef}
64+
autoHideDuration={8000}
65+
action={(key) => (
66+
<IconButton onClick={handleCloseSnackbar(key)}>
67+
<Close sx={{ color: 'white' }} />
68+
</IconButton>
69+
)}
70+
>
71+
{/* <Banner /> */}
72+
<Navbar />
73+
<BaseNavigation />
74+
</SnackbarProvider>
75+
</QueryClientProvider>
76+
);
8077
}
8178

8279
export default App;
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import { Cancel } from '@mui/icons-material';
2+
import EmojiPeopleIcon from '@mui/icons-material/EmojiPeople';
3+
import { Box, IconButton, Link } from '@mui/material';
4+
import BaseNavigationStyles from 'pages/BaseNavigation/BaseNavigation.styles';
5+
import { useState } from 'react';
6+
7+
const localStorageBannerKey = 'hide-banner-nov-20-2024';
8+
9+
const Banner: React.FC = () => {
10+
const shouldHide = !!localStorage.getItem(localStorageBannerKey);
11+
const [hideBanner, setHideBanner] = useState(shouldHide);
12+
13+
if (hideBanner) return <></>;
14+
15+
return (
16+
<Box
17+
sx={{
18+
backgroundColor: 'primary.dark',
19+
color: 'primary.contrastText',
20+
width: '100%',
21+
paddingY: '0.5rem',
22+
}}
23+
>
24+
<Box
25+
sx={[
26+
BaseNavigationStyles.pagesContainer,
27+
{
28+
marginY: '0',
29+
display: 'flex',
30+
alignItems: 'center',
31+
justifyContent: 'space-between',
32+
},
33+
]}
34+
>
35+
<Box display="flex" alignItems="center">
36+
<EmojiPeopleIcon sx={{ mr: '1rem' }} />
37+
Join us next Wednesday, December 4th 2024 at 10:00 ET for the Neurosynth Compose Virtual Town Hall!{' '}
38+
<Link
39+
color="primary.contrastText"
40+
sx={{ marginLeft: '4px' }}
41+
href="https://tally.so/r/nWePVR"
42+
target="_blank"
43+
>
44+
Click here to register
45+
</Link>
46+
</Box>
47+
<IconButton
48+
onClick={() => {
49+
localStorage.setItem(localStorageBannerKey, 'true');
50+
setHideBanner(true);
51+
}}
52+
sx={{
53+
padding: 0,
54+
':hover': { backgroundColor: 'gray' },
55+
}}
56+
>
57+
<Cancel />
58+
</IconButton>
59+
</Box>
60+
</Box>
61+
);
62+
};
63+
64+
export default Banner;

0 commit comments

Comments
 (0)