change: form actions to safe client side handlers
This commit is contained in:
@@ -49,7 +49,9 @@ function RatingOrderIndex({ }: Props) {
|
||||
)
|
||||
}
|
||||
|
||||
const submitForm = (formData: FormData) => {
|
||||
const submitForm = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
const formData = new FormData(e.currentTarget);
|
||||
console.log(formData.get('rating'))
|
||||
}
|
||||
|
||||
@@ -57,7 +59,7 @@ function RatingOrderIndex({ }: Props) {
|
||||
<section className='flex flex-col h-full pt-6'>
|
||||
<h1 className='font-medium'>{t("Heading")}</h1>
|
||||
|
||||
<form action={submitForm} className='bg-container flex flex-col h-min justify-between rounded-[30px] pt-10 px-6 pb-7.5 mt-4'>
|
||||
<form onSubmit={submitForm} className='bg-container flex flex-col h-min justify-between rounded-[30px] pt-10 px-6 pb-7.5 mt-4'>
|
||||
|
||||
<div>
|
||||
<div className='w-full'>
|
||||
|
||||
Reference in New Issue
Block a user