Archived
UI: Fehler-States statt weißer Leerseiten bei Query-Fehlern
Dashboard/Projekt/Lead/Team/Historie rendern bei fehlgeschlagener Query nicht mehr ein stilles `return null` (leere weisse Seite), sondern einen Hinweis mit "Neu laden"-Button. - Neue Komponente ErrorState (Meldung + optionaler Retry) - 5 Routen: if (q.isError || !q.data) -> ErrorState mit q.refetch() Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
90caa282ee
commit
8b0df9cc4e
6 files changed
+64
-5
No files matched your search
@@ -5,6 +5,7 @@ import { trpc } from '../lib/trpc';
|
||||
import { Card } from '../components/ui/Card';
|
||||
import { Button } from '../components/ui/Button';
|
||||
import { SkeletonCard } from '../components/ui/SkeletonCard';
|
||||
import { ErrorState } from '../components/ui/ErrorState';
|
||||
import { formatDurationCompact } from '../lib/format-duration';
|
||||
import { TIME_CATEGORIES } from '../lib/time-categories';
|
||||
|
||||
@@ -124,7 +125,13 @@ export function TeamViewRoute() {
|
||||
}, [isToday]);
|
||||
|
||||
if (q.isPending) return <SkeletonCard lines={6} />;
|
||||
if (!q.data) return null;
|
||||
if (q.isError || !q.data)
|
||||
return (
|
||||
<ErrorState
|
||||
message="Team-Ansicht konnte nicht geladen werden."
|
||||
onRetry={() => void q.refetch()}
|
||||
/>
|
||||
);
|
||||
const lanes = q.data.lanes;
|
||||
const nowMs = Date.now();
|
||||
|
||||
|
||||
Reference in new issue
Block a user