import React, { useState } from 'react'
import { Head, useForm, router, usePage } from '@inertiajs/react'
import CustomerLayout from '@/Layouts/CustomerLayout'
import FormFile from '@/Components/FormFile'
import { HiCheckCircle, HiClock } from 'react-icons/hi2'
// 0 yuk verifikasi
const VerificationForm = () => {
const {
props: {
auth: { user },
},
} = usePage()
const [show, setShow] = useState(false)
const { setData, post, errors } = useForm({ image: null })
const handleSubmit = () => {
post(route('customer.verification'))
}
return (
<>
upgrade akun kamu untuk mendapatkan banefit lebih, cukup lakukan
verifikasi data dengan upload foto KTP kamu
{show === false ? (
setShow(true)}
>
Verifikasi
) : (
setData('image', e.target.files[0])}
error={errors.image}
preview={
}
/>
handleSubmit()}
>
Upload
)}
>
)
}
// 1 verified
const Verified = () => {
return (
Akun anda berhasil terverifikasi
)
}
// 2 your data is in review
const VerificationInProgress = () => {
return (
Data anda sedang kami proses untuk verifikasi
)
}
export default function Index({ auth: { user } }) {
return (
Upgrade Member
{+user.identity_verified === 0 &&
}
{+user.identity_verified === 1 &&
}
{+user.identity_verified === 2 &&
}
)
}