Do not show modal on sign-in page
This commit is contained in:
@@ -17,13 +17,11 @@ function MyApp({ Component, pageProps: { session, ...pageProps } }: AppProps) {
|
|||||||
const slug = router.query?.slug;
|
const slug = router.query?.slug;
|
||||||
const gistId = (Array.isArray(slug) && slug[0]) ?? null;
|
const gistId = (Array.isArray(slug) && slug[0]) ?? null;
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (router.pathname.includes("/develop")) {
|
if (gistId && router.isReady) {
|
||||||
if (gistId && router.isReady) {
|
fetchFiles(gistId);
|
||||||
fetchFiles(gistId);
|
} else {
|
||||||
} else {
|
if (!gistId && router.isReady && !router.pathname.includes("/sign-in")) {
|
||||||
if (!gistId && router.isReady) {
|
state.mainModalOpen = true;
|
||||||
state.mainModalOpen = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [gistId, router.isReady, router.pathname]);
|
}, [gistId, router.isReady, router.pathname]);
|
||||||
@@ -52,6 +50,7 @@ function MyApp({ Component, pageProps: { session, ...pageProps } }: AppProps) {
|
|||||||
backgroundColor: "$mauve1",
|
backgroundColor: "$mauve1",
|
||||||
color: "$mauve10",
|
color: "$mauve10",
|
||||||
fontSize: "$sm",
|
fontSize: "$sm",
|
||||||
|
zIndex: 9999,
|
||||||
".dark &": {
|
".dark &": {
|
||||||
backgroundColor: "$mauve4",
|
backgroundColor: "$mauve4",
|
||||||
color: "$mauve12",
|
color: "$mauve12",
|
||||||
|
|||||||
Reference in New Issue
Block a user