improve AI
This commit is contained in:
parent
daf830c5ed
commit
b3a7ab40c8
7 changed files with 118 additions and 17 deletions
|
|
@ -83,6 +83,10 @@ export function useTravelTime(initial?: TravelTimeInitial) {
|
|||
[]
|
||||
);
|
||||
|
||||
const handleSetEntries = useCallback((newEntries: TravelTimeEntry[]) => {
|
||||
setEntries(newEntries);
|
||||
}, []);
|
||||
|
||||
/** Entries that have a destination selected (slug is set) */
|
||||
const activeEntries = useMemo(
|
||||
() => entries.filter((e) => e.slug !== ''),
|
||||
|
|
@ -95,6 +99,7 @@ export function useTravelTime(initial?: TravelTimeInitial) {
|
|||
handleAddEntry,
|
||||
handleRemoveEntry,
|
||||
handleSetDestination,
|
||||
handleSetEntries,
|
||||
handleTimeRangeChange,
|
||||
handleToggleBest,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue