import { useState } from 'react' import { useDebounce } from '../hooks/useDebounce' export default function SearchBar({ onSearch, isSearching }) { const [value, setValue] = useState('') const debouncedValue = useDebounce(value, 300) useState(() => { onSearch(debouncedValue) }, [debouncedValue, onSearch]) return (
setValue(e.target.value)} placeholder="Search transcripts, tags, or keywords..." className="input-field pl-12 pr-12 py-4 text-lg shadow-xl" autoFocus />
{isSearching && (
)}
Tip: Use quotes for exact phrases Tip: Use * for wildcards
) }