'use client' import { useState } from 'react' import { useRouter } from 'next/navigation' import { SearchIcon } from 'lucide-react' export default function Search() { const [search, setSearch] = useState('') const router = useRouter() const handleSearch = (e: React.FormEvent) => { e.preventDefault() router.push(`/?search=${encodeURIComponent(search)}`) } return (
setSearch(e.target.value)} placeholder="Search server packs..." className="w-full p-2 pl-10 rounded-full border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent" /> ) }