'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 (
    <div className="flex flex-col gap-4 pt-4 items-center">
      <SearchBox value={search} onChange={updateSearch} />
    </div>
  );
}
