Passing data as props in form function
Hi fam how can I pass props on a form function below is my form function
How can I pass data as prop
How can I pass data as prop
const handlesubmit =(e:React.FormEvent ) =>{
e.preventDefault()
axios.post('/api/register', data)
.then(()=>{
router.push('/')
}
.catch((error) =>{
toast.error('invalid')
}
}