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 Home = () => { const { register, handleSubmit, control } = useForm(); const onSubmit = handleSubmit((data) => createBill(data)); return (

Create a new bill

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