Skip to content

Commit

Permalink
Fix skeleton loader
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorKowalczyk committed Nov 30, 2024
1 parent 3714591 commit e6c99fb
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions apps/dashboard/app/dashboard/loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,33 @@ import { cn } from "@/lib/utils";
export default function Loading() {
return (
<div className="flex w-full flex-col items-center px-8 pb-8 pt-16 antialiased md:p-16">
<div className="flex flex-col justify-center">
<div className="mt-4 flex flex-row flex-wrap justify-center gap-4 sm:flex-col">
<Header className={cn(headerVariants({ variant: "h1", alignment: "center", margin: "normal" }))}>
<Icons.Navigation className={iconVariants({ variant: "extraLarge" })} />
Choose a server
</Header>
<p className="mb-4 text-center text-base text-white/50 md:text-xl">Select a server to manage, or add the bot to a new server.</p>
<div className="mt-4 flex flex-row flex-wrap justify-center gap-4 sm:flex-col">
<div className="flex flex-row flex-wrap justify-center gap-4 sm:flex-col">
{[...Array(10)].map((_, i) => (
// eslint-disable-next-line @eslint-react/no-array-index-key
<div key={`skeleton-${i}`}>
<div className="hidden flex-row items-center justify-start gap-4 sm:flex">
<Skeleton className="size-16 shrink-0 rounded-full" />
<Skeleton className="h-7 w-full" />
<Skeleton className="ml-auto h-10 w-32" />
<Skeleton className="h-7 w-1/3" />
<Skeleton className="ml-auto h-10 w-[115px]" />
</div>
<Skeleton className="size-24 rounded-md sm:hidden" />
</div>
))}
</div>
<div className="my-4 mt-12 flex flex-row flex-wrap items-start whitespace-nowrap rounded-md border border-accent-primary bg-accent-primary/10 p-4">
<span className="mr-1 flex flex-row items-center gap-1 whitespace-nowrap font-bold">
<Icons.Info className={iconVariants({ variant: "normal", className: "stroke-accent-primary" })} /> Note:
</span>
<span className="whitespace-normal">
You can only add the bot to servers you have the <code className="inline">Manage Server</code> permission in.
</span>
</div>
</div>
</div>
);
Expand Down

0 comments on commit e6c99fb

Please sign in to comment.