import { Button, Form, Input, Switch } from 'antd'; import { Controller, useForm } from 'react-hook-form'; import { createBill } from '../api'; import { InputSelect } from '../components/inputSelect'; import { withLayout } from '../layouts/main'; import { BillForm } from '../types/bill'; const HomePage = () => { // Hooks const { register, handleSubmit, control } = useForm(); // Logic const onSubmit = handleSubmit((data) => createBill(data)); return (

Create a new bill

{ const { value, ...props } = field; return ( ); }} />
); }; export default withLayout(HomePage);