mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-22 21:11:14 +00:00
refactor(tours): move non-component exports out of component files and split long hooks
Clears the client lint ratchet: helpers move to sibling .ts files for react-refresh, complex render paths get small helpers, floating promises are voided, the stage rail lets a stale request go during render, and the collections page reads the active list's tours and rights in ActiveCollectionTours. StageNumber is no longer exported.
This commit is contained in:
@@ -4,7 +4,7 @@ import { useNavigate } from 'react-router';
|
||||
import { useTranslation } from '../../i18n';
|
||||
import { wandererRepo } from '../../repo/wandererRepo';
|
||||
import { useToast } from '../shared/Toast';
|
||||
import { hintWhen } from '../Tours/wanderer/sourceHintParts';
|
||||
import { hintWhen } from '../Tours/wanderer/hintWhen';
|
||||
|
||||
type Translate = (key: string, params?: Record<string, unknown>) => string;
|
||||
|
||||
@@ -92,7 +92,7 @@ export function useWandererWatch(refreshKey: string) {
|
||||
const openTour = useCallback(
|
||||
(hint: WandererSourceHintItem) => {
|
||||
setHintsOpen(false);
|
||||
navigate(`/trips/${hint.tripId}?tab=plan&place=${hint.placeId}`);
|
||||
void navigate(`/trips/${hint.tripId}?tab=plan&place=${hint.placeId}`);
|
||||
},
|
||||
[navigate]
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user