Working form submission with query params

Co-authored-by: Sindre Kjelsrud <kjelsrudsindre@gmail.com>
This commit is contained in:
haraldnilsen 2023-09-12 12:04:41 +02:00
parent cd63407d03
commit 20aaef67d7
3 changed files with 7 additions and 2 deletions

View file

@ -11,7 +11,10 @@ const MovieForm: React.FC = () => {
return (
<q.form
className="flex flex-col gap-3 card p-4 rounded-lg w-full lg:px-14"
onSubmit={() => navigateToPage(movieTitle, movieYear, movieType)}
onSubmit={(e) => {
e.preventDefault()
navigateToPage(movieTitle, movieYear, movieType)
}}
>
<q.label>Choose a movie title:</q.label>
<q.input