From 952421c810b53ec4d25ad5ef605bae1bd1d5d616 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Tue, 26 Nov 2024 16:07:09 +0700
Subject: <iman> update code register to registerTnc

---
 .../modules/register/components/TermCondition.tsx  | 48 ++++++++++++++--------
 1 file changed, 31 insertions(+), 17 deletions(-)

(limited to 'src-migrate/modules/register/components/TermCondition.tsx')

diff --git a/src-migrate/modules/register/components/TermCondition.tsx b/src-migrate/modules/register/components/TermCondition.tsx
index d54fe921..44275917 100644
--- a/src-migrate/modules/register/components/TermCondition.tsx
+++ b/src-migrate/modules/register/components/TermCondition.tsx
@@ -1,34 +1,48 @@
-import { Checkbox } from '@chakra-ui/react'
-import React from 'react'
-import { Modal } from '~/components/ui/modal'
-import { useRegisterStore } from "../stores/useRegisterStore";
-import PageContent from '~/modules/page-content'
+import { Checkbox } from '@chakra-ui/react';
+import React from 'react';
+import { Modal } from '~/components/ui/modal';
+import { useRegisterStore } from '../stores/useRegisterStore';
+
+import dynamic from 'next/dynamic';
+const PageContent = dynamic(
+  () => import('@/lib/content/components/PageContent')
+);
 
 const TermCondition = () => {
-  const { isOpenTNC, closeTNC, isCheckedTNC, toggleCheckTNC, openTNC } = useRegisterStore()
+  const { isOpenTNC, closeTNC, isCheckedTNC, toggleCheckTNC, openTNC } =
+    useRegisterStore();
 
   return (
     <>
-      <div className="mt-4 flex items-center gap-x-2">
-        <Checkbox id='tnc' name='tnc' colorScheme='red' isChecked={isCheckedTNC} onChange={toggleCheckTNC} />
+      <div className='mt-4 flex items-center gap-x-2'>
+        <Checkbox
+          id='tnc'
+          name='tnc'
+          colorScheme='red'
+          isChecked={isCheckedTNC}
+          onChange={toggleCheckTNC}
+        />
         <div>
-          <label htmlFor="tnc" className="cursor-pointer">Dengan ini saya menyetujui</label>
-          {' '}
+          <label htmlFor='tnc' className='cursor-pointer'>
+            Dengan ini saya menyetujui
+          </label>{' '}
           <span
-            className="font-medium text-danger-500 cursor-pointer"
+            className='font-medium text-danger-500 cursor-pointer'
             onClick={openTNC}
           >
             syarat dan ketentuan
           </span>
-          <label htmlFor="tnc" className="ml-2 cursor-pointer">yang berlaku</label>
+          <label htmlFor='tnc' className='ml-2 cursor-pointer'>
+            yang berlaku
+          </label>
         </div>
       </div>
 
-      <Modal active={isOpenTNC} close={closeTNC} >
-        <PageContent path='/register#tnd' />
+      <Modal active={isOpenTNC} close={closeTNC}>
+        <PageContent path='/registerTnd' />
       </Modal>
     </>
-  )
-}
+  );
+};
 
-export default TermCondition
\ No newline at end of file
+export default TermCondition;
-- 
cgit v1.2.3

