mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 13:11:16 -05:00
Refactor code structure and remove redundant changes
This commit is contained in:
28
src-old/components/parks/ParkSearch.tsx
Normal file
28
src-old/components/parks/ParkSearch.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import { AutocompleteSearch } from '@/components/search/AutocompleteSearch';
|
||||
import { SearchResult } from '@/hooks/useSearch';
|
||||
|
||||
interface ParkSearchProps {
|
||||
value: string;
|
||||
onChange: (value: string) => void;
|
||||
placeholder?: string;
|
||||
onResultSelect?: (result: SearchResult) => void;
|
||||
}
|
||||
|
||||
export function ParkSearch({
|
||||
value,
|
||||
onChange,
|
||||
placeholder = "Search parks, locations, descriptions...",
|
||||
onResultSelect
|
||||
}: ParkSearchProps) {
|
||||
return (
|
||||
<AutocompleteSearch
|
||||
placeholder={placeholder}
|
||||
types={['park']}
|
||||
limit={8}
|
||||
onSearch={(query) => onChange(query)}
|
||||
onResultSelect={onResultSelect}
|
||||
showRecentSearches={false}
|
||||
className="w-full"
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user