vibes
This commit is contained in:
parent
c997ea46a5
commit
30055ab870
13 changed files with 165 additions and 83 deletions
|
|
@ -22,7 +22,7 @@ interface TravelTimeCardProps {
|
|||
isActive: boolean;
|
||||
dragValue: [number, number] | null;
|
||||
onTogglePin: () => void;
|
||||
onSetDestination: (slug: string, label: string) => void;
|
||||
onSetDestination: (slug: string, label: string, lat: number, lon: number) => void;
|
||||
onTimeRangeChange: (range: [number, number]) => void;
|
||||
onDragStart: () => void;
|
||||
onDragChange: (value: [number, number]) => void;
|
||||
|
|
@ -54,8 +54,8 @@ export function TravelTimeCard({
|
|||
const [showBestInfo, setShowBestInfo] = useState(false);
|
||||
|
||||
const handleDestinationSelect = useCallback(
|
||||
(selectedSlug: string, selectedLabel: string) => {
|
||||
onSetDestination(selectedSlug, selectedLabel);
|
||||
(selectedSlug: string, selectedLabel: string, lat: number, lon: number) => {
|
||||
onSetDestination(selectedSlug, selectedLabel, lat, lon);
|
||||
},
|
||||
[onSetDestination]
|
||||
);
|
||||
|
|
@ -103,7 +103,7 @@ export function TravelTimeCard({
|
|||
loading={destinationsLoading}
|
||||
onSelect={handleDestinationSelect}
|
||||
value={label || undefined}
|
||||
onClear={() => onSetDestination('', '')}
|
||||
onClear={() => onSetDestination('', '', 0, 0)}
|
||||
placeholder="Select destination..."
|
||||
/>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue