feat: implement search functionality for news articles with query parameter

This commit is contained in:
Ardeman
2025-03-24 19:42:27 +08:00
parent 9ab67c615a
commit 4ff1e23d25
4 changed files with 90 additions and 2 deletions
+6 -1
View File
@@ -3,11 +3,16 @@ import { Button } from '~/components/ui/button'
export const HeaderSearch = () => {
return (
<form className="flex flex-1 justify-between gap-[15px] px-[35px]">
<form
className="flex flex-1 justify-between gap-[15px] px-[35px]"
method="get"
action="/search"
>
<input
placeholder="Cari..."
className="flex-1 text-xl placeholder:text-white focus:ring-0 focus:outline-none"
size={1}
name="q"
/>
<Button
type="submit"