From a62455b49def24f72a0ef3c5646480535faaad82 Mon Sep 17 00:00:00 2001 From: yuqi88 Date: Tue, 29 Mar 2022 05:39:16 -0700 Subject: [PATCH 1/3] styling submit button --- src/pages/puzzles/[instanceId]/index.tsx | 36 +++++++++++++----------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src/pages/puzzles/[instanceId]/index.tsx b/src/pages/puzzles/[instanceId]/index.tsx index d64af96..01da8ff 100644 --- a/src/pages/puzzles/[instanceId]/index.tsx +++ b/src/pages/puzzles/[instanceId]/index.tsx @@ -169,23 +169,25 @@ const PuzzlePage = ({ setAnswer={setAnswer} /> - {isAuthenticated ? ( - - ); -} +}; export default SignUpDialog; diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index e2b4c81..6ea12ec 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -9,7 +9,6 @@ const MyApp = ({ Component, pageProps: { session, initStore, ...pageProps } }: AppProps) => { - const TOAST_LIMIT = 1; const { toasts } = useToasterStore(); @@ -17,15 +16,15 @@ const MyApp = ({ // Solution is proposed by @timolins from https://github.com/timolins/react-hot-toast/issues/31#issuecomment-803359550 useEffect(() => { toasts - .filter((t) => t.visible) + .filter(t => t.visible) .filter((_, i) => i >= TOAST_LIMIT) - .forEach((t) => toast.dismiss(t.id)); + .forEach(t => toast.dismiss(t.id)); }, [toasts]); return ( - - - + + + ); }; diff --git a/src/pages/auth/signup/index.tsx b/src/pages/auth/signup/index.tsx index 8ffab87..1a5a45b 100644 --- a/src/pages/auth/signup/index.tsx +++ b/src/pages/auth/signup/index.tsx @@ -27,9 +27,7 @@ const SignUpPage = () => { return false; } if (status === 'authenticated') { - toast(t => ( - - )); + toast(t => ); return false; } else { signUp({ email, password }); diff --git a/src/pages/puzzles/[instanceId]/index.tsx b/src/pages/puzzles/[instanceId]/index.tsx index 01da8ff..52317c9 100644 --- a/src/pages/puzzles/[instanceId]/index.tsx +++ b/src/pages/puzzles/[instanceId]/index.tsx @@ -171,21 +171,21 @@ const PuzzlePage = ({
{isAuthenticated ? ( -
diff --git a/src/styles/pages/PuzzlePage.module.scss b/src/styles/pages/PuzzlePage.module.scss index 2c0d32c..5bf133d 100644 --- a/src/styles/pages/PuzzlePage.module.scss +++ b/src/styles/pages/PuzzlePage.module.scss @@ -92,50 +92,44 @@ margin: 3rem 0; } - /* MEDIA QUERIES*/ @media (max-width: 600px) { - .card{ + .card { max-width: 600px; flex-direction: column; } } @media (max-width: 768px) { - .card{ + .card { max-width: 720px; flex-direction: column; } } @media (max-width: 992px) { - .card{ + .card { max-width: 960px; flex-direction: column; - } } @media (max-width: 1200px) { .card { max-width: 1140px; } - .text{ + .text { flex: 0 0 65%; } - .image{ + .image { flex: 0 0 35%; } } @media (min-width: 1200px) { - .card{ + .card { min-width: 1140px; } - .text{ + .text { flex: 0 0 65%; } - .image{ - flex: 0 0 35%; + .image { + flex: 0 0 35%; } - } - - -