summaryrefslogtreecommitdiff
path: root/src-migrate
diff options
context:
space:
mode:
Diffstat (limited to 'src-migrate')
-rw-r--r--src-migrate/common/components/elements/Modal.tsx6
-rw-r--r--src-migrate/modules/popup-information/index.tsx40
2 files changed, 43 insertions, 3 deletions
diff --git a/src-migrate/common/components/elements/Modal.tsx b/src-migrate/common/components/elements/Modal.tsx
index ea95c0b1..c9c621e0 100644
--- a/src-migrate/common/components/elements/Modal.tsx
+++ b/src-migrate/common/components/elements/Modal.tsx
@@ -67,13 +67,13 @@ const Modal = ({
{...variant}
className={modalClassNames}
>
- <div className='flex justify-between py-5 sticky top-0 bg-white'>
+ <div className='flex justify-between py-5 sticky top-0 '>
<div className='font-semibold text-h-sm md:text-title-sm'>
{title}
</div>
{close && (
- <button type='button' onClick={close}>
- <XMarkIcon className='w-5 stroke-2' />
+ <button className="rounded-full h-10 w-10 flex justify-center items-center bg-white" type='button' onClick={close}>
+ <XMarkIcon className='w-5 h-5 ' />
</button>
)}
</div>
diff --git a/src-migrate/modules/popup-information/index.tsx b/src-migrate/modules/popup-information/index.tsx
new file mode 100644
index 00000000..cd1fd5f2
--- /dev/null
+++ b/src-migrate/modules/popup-information/index.tsx
@@ -0,0 +1,40 @@
+import { useRouter } from 'next/router';
+import { useEffect, useState } from 'react';
+import Modal from '~/common/components/elements/Modal';
+import { getAuth } from '~/common/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;