| 1 | "use client"; |
| 2 | |
| 3 | import type { ComponentProps } |
| 4 | |
| 5 | import { Skeleton } |
| 6 | import { cn } |
| 7 | import { |
| 8 | OrganizationLogo, |
| 9 | type OrganizationLogoSize, |
| 10 | } from "./organization-logo"; |
| 11 | |
| 12 | export type OrganizationViewSkeletonProps |
| 13 | className?: string |
| 14 | hideSlug?: boolean |
| 15 | size?: OrganizationLogoSize |
| 16 | }; |
| 17 | |
| 18 | /** Placeholder matching `OrganizationView` while organization data loads. */ |
| 19 | export function OrganizationViewSkeleton({ |
| 20 | className, |
| 21 | hideSlug, |
| 22 | size = "md" |
| 23 | ...props |
| 24 | }: OrganizationViewSkeletonProps |
| 25 | return ( |
| 26 | <div |
| 27 | className={cn(" |
| 28 | {...props} |
| 29 | > |
| 30 | <OrganizationLogo |
| 31 | isPending |
| 32 | className={size === |
| 33 | size={size === |
| 34 | /> |
| 35 | |
| 36 | <div className="flex flex-col min-w-0 gap-1 |
| 37 | <Skeleton className=" |
| 38 | |
| 39 | {!hideSlug && < |
| 40 | </div> |
| 41 | </div> |
| 42 | ); |
| 43 | } |