blob: b51589e8a0091df28b90358d3f3d60148ffb8f6c (
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
|
import Seo from '@/core/components/Seo';
import BasicLayout from '@/core/components/layouts/BasicLayout';
import CreateMerchant from '@/lib/merchant/components/Merchant';
import ErrorMerchant from '@/lib/merchant/components/AccountSwitch';
import useAuth from '@/core/hooks/useAuth';
import { useRouter } from 'next/router';
export default function DaftarMerchant() {
const router = useRouter();
const auth = useAuth();
if (auth == false) {
router.push(`/login?next=${encodeURIComponent('/daftar-merchant')}`);
}
if (!auth) {
return;
}
return (
<>
<Seo title='Daftar Merchant - Indoteknik.com' />
<BasicLayout>
{auth && auth?.company ? (
<CreateMerchant></CreateMerchant>
) : (
<ErrorMerchant />
)}
</BasicLayout>
</>
);
}
|