From 4ac372ff318ee78e5d5019a1dbe95bf47b661766 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Tue, 5 Dec 2023 09:57:39 +0700
Subject: onbording popup

---
 src-migrate/modules/popup-information/index.tsx | 38 +++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 src-migrate/modules/popup-information/index.tsx

(limited to 'src-migrate/modules/popup-information/index.tsx')

diff --git a/src-migrate/modules/popup-information/index.tsx b/src-migrate/modules/popup-information/index.tsx
new file mode 100644
index 00000000..0d48a92a
--- /dev/null
+++ b/src-migrate/modules/popup-information/index.tsx
@@ -0,0 +1,38 @@
+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-10/12 md:w-fit'
+        close={() => setActive(false)}
+        mode='desktop'
+      >
+        <div>
+          <PageContent path='/onbording-popup' />
+          <Link href={'/register'} className='btn-yellow w-full mt-2'>
+            Daftar Sekarang
+          </Link>
+        </div>
+      </Modal>
+    </div>
+  );
+};
+
+export default PagePopupInformation;
-- 
cgit v1.2.3

