From cbdf6ba06a4a5c168d99d00153efd14dda911068 Mon Sep 17 00:00:00 2001 From: imhson Date: Fri, 18 Oct 2024 10:41:14 +0700 Subject: [PATCH] update --- .../events/ava-2024/map/manga-room/page.tsx | 160 +++++++++--------- .../ava-2024/map/submit-portal/page.tsx | 6 +- .../map/submit-portal/round2Submission.tsx | 51 +++--- 3 files changed, 111 insertions(+), 106 deletions(-) diff --git a/src/pages/events/ava-2024/map/manga-room/page.tsx b/src/pages/events/ava-2024/map/manga-room/page.tsx index f1862d42..6e77ffb7 100644 --- a/src/pages/events/ava-2024/map/manga-room/page.tsx +++ b/src/pages/events/ava-2024/map/manga-room/page.tsx @@ -131,7 +131,7 @@ export default function Page() { {t('Back to map')} - {selected && } +
{selected && }
)} @@ -140,88 +140,88 @@ export default function Page() { {width < 1024 && showModal && ( <> -
setShowModal(false)}>
-
-
setShowModal(false)}> - - - - - - - - - - - - - - +
setShowModal(false)}>
+
+
setShowModal(false)}> + + + + + + + + + + + + + + - - - - - - - - - + - - + + + + + + + + + +
+
- -
)} diff --git a/src/pages/events/ava-2024/map/submit-portal/page.tsx b/src/pages/events/ava-2024/map/submit-portal/page.tsx index 215329ff..0f07e7db 100644 --- a/src/pages/events/ava-2024/map/submit-portal/page.tsx +++ b/src/pages/events/ava-2024/map/submit-portal/page.tsx @@ -14,6 +14,7 @@ import Round2Submission from './round2Submission' import DecorLeft from 'components/pages/event/ava-2024/assets/decor-left.png' import DecorRight from 'components/pages/event/ava-2024/assets/decor-right.png' import DecorMiddle from 'components/pages/event/ava-2024/assets/decor-middle.png' +import { useRouter } from 'next/router' export default function Page(props) { if (props.justHead) { return <> @@ -28,12 +29,15 @@ function Event() { const [round, setRound] = useState( searchParams.get('tab') == 'round-3' ? 3 : searchParams.get('tab') == 'round-2' ? 2 : 1 ) + const { replace } = useRouter() useEffect(() => { if (!account) { setSignInOpen(true) } }, [account]) - const guideContentRef = useRef() + useEffect(() => { + replace(`${location.pathname}?tab=round-${round}`) + }, [round]) return ( <>
{ href={`https://explorer.story.foundation/ipa/${data?.story_ip_asset?.ip_asset_id}`} target='_blank' className='mt-1 text-xs font-medium text-brand-default' - onClick={(e) => e.stopPropagation()} - > + onClick={(e) => e.stopPropagation()}> {shorten(data.story_ip_asset?.ip_asset_id)} )}