diff options
| author | trisusilo <tri.susilo@altama.co.id> | 2024-12-06 04:05:28 +0000 |
|---|---|---|
| committer | trisusilo <tri.susilo@altama.co.id> | 2024-12-06 04:05:28 +0000 |
| commit | a382c261cd1a77acb0b8d21175c857d6da61c81f (patch) | |
| tree | 3d268ba20b467b99e0bb142f64923eb939c8c4ad /src-migrate | |
| parent | 21e60f62109b04e5fd6deaedbf9beaa192fa18bb (diff) | |
| parent | 0ef6dd27b4c516c6948e8107c9e2477fca9f069f (diff) | |
Merged in CR/optimize_performance_2 (pull request #394)
update performance
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' |
