add: search box
This commit is contained in:
+13
-3
@@ -1,10 +1,20 @@
|
||||
'use client';
|
||||
|
||||
import SearchBox from "@/components/input/SearchBox";
|
||||
import { useState } from "react";
|
||||
|
||||
export default function MenuIndex() {
|
||||
const [search, setSearch] = useState('');
|
||||
|
||||
const updateSearch = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
if (e) {
|
||||
setSearch(() => e.target.value);
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
Menu
|
||||
</>
|
||||
<div className="flex flex-col gap-4 pt-4 items-center">
|
||||
<SearchBox value={search} onChange={updateSearch} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user