|
1 | | -"use client"; |
2 | | - |
3 | | -import { Skeleton } from "boneyard-js/react"; |
| 1 | +import { Skeleton } from "@/components/ui/skeleton"; |
4 | 2 |
|
5 | 3 | export default function MovieLoading() { |
6 | 4 | return ( |
7 | | - <Skeleton |
8 | | - name="movie-detail" |
9 | | - loading={true} |
10 | | - animate="shimmer" |
11 | | - fallback={ |
12 | | - <div className="flex flex-col"> |
13 | | - <div className="w-full h-[50vh] sm:h-[60vh] bg-muted animate-pulse" /> |
14 | | - <div className="relative -mt-48 z-10 mx-auto max-w-7xl w-full px-4 sm:px-6 pb-16"> |
15 | | - <div className="flex flex-col sm:flex-row gap-8"> |
16 | | - <div className="shrink-0 mx-auto sm:mx-0 w-50 sm:w-65 aspect-[2/3] bg-muted animate-pulse rounded-2xl" /> |
17 | | - <div className="flex-1 space-y-5 pt-4 sm:pt-16"> |
18 | | - <div className="h-12 w-75 max-w-full bg-muted animate-pulse rounded" /> |
19 | | - <div className="h-5 w-64 bg-muted animate-pulse rounded" /> |
20 | | - <div className="h-12 w-44 bg-muted animate-pulse rounded-full" /> |
21 | | - </div> |
| 5 | + <div className="flex flex-col"> |
| 6 | + {/* Backdrop skeleton */} |
| 7 | + <div className="relative w-full h-[50vh] sm:h-[60vh]"> |
| 8 | + <Skeleton className="absolute inset-0 rounded-none" /> |
| 9 | + <div className="absolute inset-0 bg-linear-to-t from-background via-background/70 to-background/30" /> |
| 10 | + </div> |
| 11 | + |
| 12 | + {/* Content skeleton */} |
| 13 | + <div className="relative -mt-48 z-10 mx-auto max-w-7xl w-full px-4 sm:px-6 pb-16"> |
| 14 | + <div className="flex flex-col sm:flex-row gap-8"> |
| 15 | + <Skeleton className="shrink-0 mx-auto sm:mx-0 w-50 sm:w-65 aspect-2/3 rounded-2xl" /> |
| 16 | + |
| 17 | + <div className="flex-1 space-y-5 pt-4 sm:pt-16"> |
| 18 | + <div className="flex gap-2"> |
| 19 | + {Array.from({ length: 3 }).map((_, i) => ( |
| 20 | + <Skeleton key={i} className="h-6 w-20 rounded-full" /> |
| 21 | + ))} |
| 22 | + </div> |
| 23 | + <Skeleton className="h-12 w-75 max-w-full" /> |
| 24 | + <Skeleton className="h-5 w-64" /> |
| 25 | + <div className="flex gap-4"> |
| 26 | + <Skeleton className="h-5 w-20" /> |
| 27 | + <Skeleton className="h-5 w-20" /> |
| 28 | + <Skeleton className="h-5 w-32" /> |
22 | 29 | </div> |
| 30 | + <Skeleton className="h-12 w-44 rounded-full" /> |
| 31 | + <Skeleton className="h-px w-full" /> |
| 32 | + <div className="space-y-2"> |
| 33 | + <Skeleton className="h-6 w-24" /> |
| 34 | + <Skeleton className="h-4 w-full" /> |
| 35 | + <Skeleton className="h-4 w-full" /> |
| 36 | + <Skeleton className="h-4 w-3/4" /> |
| 37 | + </div> |
| 38 | + </div> |
| 39 | + </div> |
| 40 | + |
| 41 | + {/* Cast skeleton */} |
| 42 | + <div className="mt-12 space-y-4"> |
| 43 | + <Skeleton className="h-7 w-20" /> |
| 44 | + <div className="flex gap-4"> |
| 45 | + {Array.from({ length: 8 }).map((_, i) => ( |
| 46 | + <div |
| 47 | + key={i} |
| 48 | + className="shrink-0 w-27.5 flex flex-col items-center gap-2" |
| 49 | + > |
| 50 | + <Skeleton className="w-27.5 h-27.5 rounded-full" /> |
| 51 | + <Skeleton className="h-4 w-20" /> |
| 52 | + <Skeleton className="h-3 w-16" /> |
| 53 | + </div> |
| 54 | + ))} |
23 | 55 | </div> |
24 | 56 | </div> |
25 | | - } |
26 | | - > |
27 | | - {null} |
28 | | - </Skeleton> |
| 57 | + </div> |
| 58 | + </div> |
29 | 59 | ); |
30 | 60 | } |
0 commit comments