|
1 |
| -const CommentSkeletonSingle = () => { |
2 |
| - return ( |
3 |
| - <li className="relative list-none content-auto"> |
4 |
| - <div className="group flex w-full items-stretch gap-2"> |
5 |
| - <div className="flex w-9 shrink-0 items-end"> |
6 |
| - <div className="size-9 rounded-full bg-gray-300 dark:bg-neutral-600" /> |
7 |
| - </div> |
| 1 | +const CommentSkeletonSingle = ( |
| 2 | + <li className="relative list-none content-auto"> |
| 3 | + <div className="group flex w-full items-stretch gap-2"> |
| 4 | + <div className="flex w-9 shrink-0 items-end"> |
| 5 | + <div className="size-9 rounded-full bg-gray-300 dark:bg-neutral-600" /> |
| 6 | + </div> |
8 | 7 |
|
9 |
| - <div className="flex w-full min-w-0 flex-1 flex-col items-start"> |
10 |
| - <span className="relative mb-2 flex w-full min-w-0 items-center justify-center gap-2"> |
11 |
| - <span className="flex grow items-center gap-2"> |
12 |
| - <span className="ml-2 h-4 w-20 bg-gray-300 dark:bg-neutral-600" /> |
13 |
| - <span className="flex select-none items-center space-x-2"> |
14 |
| - <span className="inline-flex h-4 w-20 bg-gray-300 text-[0.71rem] font-medium opacity-40 dark:bg-neutral-600" /> |
15 |
| - <span className="h-4 w-20 bg-gray-300 text-[0.71rem] opacity-30 dark:bg-neutral-600" /> |
16 |
| - </span> |
| 8 | + <div className="flex w-full min-w-0 flex-1 flex-col items-start"> |
| 9 | + <span className="relative mb-2 flex w-full min-w-0 items-center justify-center gap-2"> |
| 10 | + <span className="flex grow items-center gap-2"> |
| 11 | + <span className="ml-2 h-4 w-20 bg-gray-300 dark:bg-neutral-600" /> |
| 12 | + <span className="flex select-none items-center space-x-2"> |
| 13 | + <span className="inline-flex h-4 w-20 bg-gray-300 text-[0.71rem] font-medium opacity-40 dark:bg-neutral-600" /> |
| 14 | + <span className="h-4 w-20 bg-gray-300 text-[0.71rem] opacity-30 dark:bg-neutral-600" /> |
17 | 15 | </span>
|
18 | 16 | </span>
|
| 17 | + </span> |
19 | 18 |
|
20 |
| - <div className="relative flex w-full flex-col gap-2"> |
21 |
| - <div className="relative ml-2 inline-block h-4 w-[calc(100%-3rem)] rounded-xl bg-gray-300 px-2 py-1 dark:bg-neutral-600" /> |
22 |
| - <div className="relative ml-2 inline-block h-4 w-[120px] rounded-xl bg-gray-300 px-2 py-1 dark:bg-neutral-600" /> |
23 |
| - </div> |
| 19 | + <div className="relative flex w-full flex-col gap-2"> |
| 20 | + <div className="relative ml-2 inline-block h-4 w-[calc(100%-3rem)] rounded-xl bg-gray-300 px-2 py-1 dark:bg-neutral-600" /> |
| 21 | + <div className="relative ml-2 inline-block h-4 w-[120px] rounded-xl bg-gray-300 px-2 py-1 dark:bg-neutral-600" /> |
24 | 22 | </div>
|
25 | 23 | </div>
|
| 24 | + </div> |
| 25 | + |
| 26 | + <span className="sr-only">Loading...</span> |
| 27 | + </li> |
| 28 | +) |
26 | 29 |
|
27 |
| - <span className="sr-only">Loading...</span> |
28 |
| - </li> |
29 |
| - ) |
30 |
| -} |
31 | 30 | export const CommentSkeleton: Component = () => {
|
32 | 31 | return (
|
33 | 32 | <div className="flex min-h-[400px] flex-col space-y-4">
|
34 |
| - <CommentSkeletonSingle /> |
35 |
| - <CommentSkeletonSingle /> |
36 |
| - <CommentSkeletonSingle /> |
37 |
| - <CommentSkeletonSingle /> |
| 33 | + {CommentSkeletonSingle} |
| 34 | + {CommentSkeletonSingle} |
| 35 | + {CommentSkeletonSingle} |
| 36 | + {CommentSkeletonSingle} |
| 37 | + {CommentSkeletonSingle} |
38 | 38 | </div>
|
39 | 39 | )
|
40 | 40 | }
|
0 commit comments