add: search box

This commit is contained in:
Mahyar Khanbolooki
2025-07-07 15:13:24 +03:30
parent 5d29e42176
commit aca8509ad1
5 changed files with 79 additions and 15 deletions
+13 -3
View File
@@ -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>
);
}