blob: 3d537236b4e7fd613d4f00a62cb5e4c773d10e68 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
import { useRouter } from 'next/router';
import { useEffect, useState } from 'react';
import { Modal } from "~/components/ui/modal"
import { getAuth } from '~/libs/auth';
import PageContent from '../page-content';
import Link from 'next/link';
const PagePopupInformation = () => {
const router = useRouter();
const isHomePage = router.pathname === '/';
const auth = getAuth();
const [active, setActive] = useState<boolean>(false);
useEffect(() => {
if (isHomePage && !auth) {
setActive(true);
}
}, [isHomePage, auth]);
return (
<div className='group'>
<Modal
active={active}
className='!w-fit !bg-transparent !border-none overflow-hidden'
close={() => setActive(false)}
mode='desktop'
>
<div className='w-[350px] md:w-[530px] '>
<Link href={'/register'}>
<PageContent path='/onbording-popup' />
</Link>
{/* <Link href={'/register'} className='btn-yellow w-full mt-2'>
Daftar Sekarang
</Link> */}
</div>
</Modal>
</div>
);
};
export default PagePopupInformation;
|