mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-02 01:12:16 +00:00
chore(ci): give the server test typecheck room, format new client files
The server's src and tests together are past 570,000 lines and the test typecheck needs about 4.3 GB, over Node's default heap; it now gets 8 GB like the test jobs. Forty new client files are formatted, and the react-hooks/refs baseline drops by the one warning a split hook removed.
This commit is contained in:
@@ -20,7 +20,7 @@ export function skiChoiceMissing(choice: SkiChoice): 'discipline' | 'technique'
|
||||
|
||||
/** The fields a complete choice is sent as; null while something is missing. */
|
||||
export function skiFieldsOf(
|
||||
choice: SkiChoice,
|
||||
choice: SkiChoice
|
||||
): Pick<TourSkiClassificationRequest, 'ski_discipline' | 'ski_technique'> | null {
|
||||
if (choice.discipline === null || skiChoiceMissing(choice)) return null;
|
||||
return choice.discipline === 'cross_country'
|
||||
|
||||
@@ -29,8 +29,7 @@ export function useSkiClassification({ tripId, planner, tours, canEdit, onSaved
|
||||
const [draft, setDraft] = useState<SkiChoice | null>(null);
|
||||
const [saving, setSaving] = useState(false);
|
||||
const viewed = planner.mode.type === 'view-gpx' ? planner.mode.tour : null;
|
||||
const tour =
|
||||
viewed?.tour_type === 'ski' ? (tours.find((item) => item.place_id === viewed.place_id) ?? viewed) : null;
|
||||
const tour = viewed?.tour_type === 'ski' ? (tours.find((item) => item.place_id === viewed.place_id) ?? viewed) : null;
|
||||
const saved = useMemo(() => (tour ? skiChoiceOf(tour) : NO_SKI_CHOICE), [tour]);
|
||||
|
||||
const open = useCallback(() => {
|
||||
|
||||
Reference in New Issue
Block a user