Skip to content

Commit 91c8d54

Browse files
ut42techclaude
andcommitted
fix(admin): shape the participant detail loading skeleton like its content
The loading fallback was two generic blocks that looked nothing like the final layout, so the swap to real data jumped. Replace it with a content-shaped placeholder: a stat-card skeleton (badge + id + 2-col label/value grid) and a history section (heading + rows), mirroring DetailBody so the transition is smooth. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 89a14b5 commit 91c8d54

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

apps/admin/src/components/participant-detail-sheet.tsx

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,28 @@ export function ParticipantDetailSheet({ participantId, onOpenChange }: Props) {
110110

111111
<div className="flex flex-col gap-6 px-6 pb-8">
112112
{state.kind === 'loading' && (
113+
// 実コンテンツ(DetailBody)と同じ骨格のプレースホルダにして、
114+
// 読み込み完了時のレイアウトの飛びをなくす。
113115
<>
114-
<Skeleton className="h-20 w-full" />
115-
<Skeleton className="h-40 w-full" />
116+
<section className="grid gap-3 rounded-lg border bg-card p-4">
117+
<div className="flex items-center gap-2">
118+
<Skeleton className="h-5 w-16 rounded-full" />
119+
<Skeleton className="h-3.5 w-24" />
120+
</div>
121+
<div className="grid grid-cols-2 gap-x-4 gap-y-3">
122+
{[0, 1, 2, 3, 4, 5, 6, 7].map((i) => (
123+
<Skeleton key={i} className={i % 2 === 0 ? 'h-4 w-20' : 'h-4 w-full'} />
124+
))}
125+
</div>
126+
</section>
127+
<section className="flex flex-col gap-2">
128+
<Skeleton className="h-4 w-20" />
129+
<div className="flex flex-col gap-2 rounded-lg border p-3">
130+
{[0, 1, 2, 3].map((i) => (
131+
<Skeleton key={i} className="h-6 w-full" />
132+
))}
133+
</div>
134+
</section>
116135
</>
117136
)}
118137

0 commit comments

Comments
 (0)