import React, { useEffect } from 'react' import GuestLayout from '@/Layouts/GuestLayout' import InputError from '@/Components/Defaults/InputError' import { Head, Link, useForm } from '@inertiajs/react' import { Button, TextInput, Label, Checkbox, Spinner } from 'flowbite-react' export default function Login({ app_name, customer, point }) { const { data, setData, post, processing, errors, reset } = useForm({ customer_code: '', }) const onHandleChange = (event) => { setData( event.target.name, event.target.type === 'checkbox' ? event.target.checked : event.target.value ) } const handleKeyDown = (e) => { if (e.code === 'Enter') { post(route('home')) } } const submit = (e) => { e.preventDefault() post(route('home')) } return (
{app_name}
{customer !== null && (
Customer:{' '} {customer}
Point:{' '} {point}
)}
) }