diff options
Diffstat (limited to 'src-migrate')
| -rw-r--r-- | src-migrate/modules/popup-information/index.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src-migrate/modules/popup-information/index.tsx b/src-migrate/modules/popup-information/index.tsx index 5acdb068..d50711cc 100644 --- a/src-migrate/modules/popup-information/index.tsx +++ b/src-migrate/modules/popup-information/index.tsx @@ -5,6 +5,7 @@ import Image from 'next/image'; import Link from 'next/link'; import { Modal } from '~/components/ui/modal'; import { getAuth } from '~/libs/auth'; +import dynamic from 'next/dynamic'; const PagePopupInformation = () => { const router = useRouter(); @@ -12,6 +13,8 @@ const PagePopupInformation = () => { const auth = getAuth(); const [active, setActive] = useState<boolean>(false); const [data, setData] = useState<any>(null); + const [loading, setLoading] = useState(true); + useEffect(() => { const getData = async () => { @@ -20,6 +23,7 @@ const PagePopupInformation = () => { if (data) { setData(data); } + setLoading(false); }; if (isHomePage && !auth) { @@ -29,7 +33,7 @@ const PagePopupInformation = () => { }, [isHomePage, auth]); return ( <div className='group'> - {data && ( + {data && !loading && ( <Modal active={active} className='!w-fit !bg-transparent !border-none overflow-hidden' |
