freezmo/components/RouteLoading.tsx
Martin Dvorak 2d4d4ee776 One loading screen everywhere (the deck wizard's)
The deck wizard had the good one — app icon, rotating stage message as the
headline, progress bar, stage checklist, tip, Cancel — while homework showed
a spinner with a title and route loads a pulsing icon with a smaller line.
All of them now render components/LoadingState:

- the wizard passes its vision/generation stages and keeps its deck tips;
- homework passes the same shape with homework wording (no tips: they are
  deck-specific);
- route screens (review/stats/exam loading boundaries + the link overlay)
  pass a single message, no stages or progress.

Cancel stays a 44px touch target, the icon animation respects
prefers-reduced-motion, and the unused homework.loading.title string is
gone from both languages.

Suites: freeze-loading 6/6, review 18/18, wizard 88/88, mobile 105/105,
regression 38/38, native 31/31, phase-2 62/62, phase-3 30/30, i18n 13/13.
README: decision 60. SW -> freezmo-v47.
2026-10-12 18:43:53 +00:00

17 lines
578 B
TypeScript

"use client";
import { LoadingState } from "@/components/LoadingState";
/**
* Route-level loading screen (used by `loading.tsx` boundaries and by client
* screens that wait for local data). Rendered the moment a navigation starts,
* so a slow request never looks like a dead tap. Same loading screen as the
* rest of the app, without pipeline stages.
*/
export function RouteLoading({ messageKey }: { messageKey: string }) {
return (
<div className="frost-bg grid min-h-dvh place-items-center px-4">
<LoadingState messageKey={messageKey} />
</div>
);
}