mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 14:37:17 +00:00
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:
parent
ebe8df69fb
commit
5bb70a63ac
1 changed files with 20 additions and 0 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Reference in a new issue