From a77ec6e2254a43fd5258cea666c8fe8d0a79af32 Mon Sep 17 00:00:00 2001 From: Maurice Date: Sun, 8 Nov 2026 03:00:39 +0000 Subject: [PATCH] fix(ci): the track sheet reads the distance unit as a DistanceUnit, and knip's baseline drops the type useFollowTrack no longer leaves unused --- client/src/mobile/screens/trip/roadtrip/MRtTrackSheet.tsx | 3 ++- scripts/ci/knip-baseline.json | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/mobile/screens/trip/roadtrip/MRtTrackSheet.tsx b/client/src/mobile/screens/trip/roadtrip/MRtTrackSheet.tsx index 33dc961fe..7cfae26eb 100644 --- a/client/src/mobile/screens/trip/roadtrip/MRtTrackSheet.tsx +++ b/client/src/mobile/screens/trip/roadtrip/MRtTrackSheet.tsx @@ -4,6 +4,7 @@ import type { FollowTrackOutcome } from '../../../../components/Roadtrip/useFoll import { useIsWide } from '../../../../hooks/sizeClass'; import { useTranslation } from '../../../../i18n'; import { useSettingsStore } from '../../../../store/settingsStore'; +import type { DistanceUnit } from '../../../../types'; import { formatDistance } from '../../../../utils/units'; import MSheet from '../../../components/MSheet'; import type { MTripSheetsProps } from '../MTripShell'; @@ -59,7 +60,7 @@ export function MRtTrackEntry({ planner, dayId }: { planner: MTripSheetsProps['p export default function MRtTrackSheet({ planner }: MTripSheetsProps) { const { t } = useTranslation(); - const unit = useSettingsStore((s) => s.settings.distance_unit); + const unit: DistanceUnit = useSettingsStore((s) => s.settings.distance_unit) === 'imperial' ? 'imperial' : 'metric'; const large = useIsWide(); const follow = planner.followTrack; const { dayId, busy, round, error, outcome, tracks, viaCount, current } = follow; diff --git a/scripts/ci/knip-baseline.json b/scripts/ci/knip-baseline.json index f6017baca..64ed599ad 100644 --- a/scripts/ci/knip-baseline.json +++ b/scripts/ci/knip-baseline.json @@ -143,7 +143,6 @@ "client/src/components/Roadtrip/nightSpill.ts": 1, "client/src/components/Roadtrip/refuelSuggestion.ts": 1, "client/src/components/Roadtrip/roadtripModel.ts": 4, - "client/src/components/Roadtrip/useFollowTrack.ts": 1, "client/src/components/Roadtrip/useRoadtripRoutes.ts": 3, "client/src/components/Studio/StudioCanvas.tsx": 1, "client/src/components/Studio/mapTiles.ts": 1,