fix(dashboard): show skeleton loader while access tokens load (#7895)

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Jonathan Brennan <jonathanawesome@users.noreply.github.com>
This commit is contained in:
Matt Van Horn 2026-03-25 00:33:49 -07:00 committed by GitHub
parent ebe8df69fb
commit 5bb70a63ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,6 +6,7 @@ import { CardDescription } from '@/components/ui/card';
import { DocsLink } from '@/components/ui/docs-note';
import { SubPageLayout, SubPageLayoutHeader } from '@/components/ui/page-content-layout';
import { Sheet, SheetTrigger } from '@/components/ui/sheet';
import { Skeleton } from '@/components/ui/skeleton';
import { graphql } from '@/gql';
import { AccessTokensTable } from './access-tokens-table';
import { CreateAccessTokenSheetContent } from './create-access-token-sheet-content';
@ -106,6 +107,25 @@ export function AccessTokensSubPage(props: AccessTokensSubPageProps): React.Reac
onDiscard={() => setCreateAccessTokenState(CreateAccessTokenState.closed)}
/>
)}
{query.fetching && !query.data?.organization && (
<div className="space-y-3">
<div className="flex w-full items-center space-x-4">
<Skeleton className="h-10 w-1/4" />
<Skeleton className="h-10 w-1/2" />
<Skeleton className="h-10 w-1/4" />
</div>
<div className="flex w-full items-center space-x-4">
<Skeleton className="h-10 w-1/4" />
<Skeleton className="h-10 w-1/2" />
<Skeleton className="h-10 w-1/4" />
</div>
<div className="flex w-full items-center space-x-4">
<Skeleton className="h-10 w-1/4" />
<Skeleton className="h-10 w-1/2" />
<Skeleton className="h-10 w-1/4" />
</div>
</div>
)}
{query.data?.organization && (
<AccessTokensTable
accessTokens={query.data.organization.allAccessTokens}