fix: loading spinner positions (#5262)

This commit is contained in:
Laurin Quast 2024-07-22 11:25:00 +02:00 committed by GitHub
parent 4c63ca8bb2
commit 0a1860bed2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 18 additions and 17 deletions

View file

@ -55,7 +55,7 @@ export function IndexPage() {
return (
<>
<Meta title="Welcome" />
<div className="flex size-full flex-row items-center justify-center">
<div className="flex size-full h-[100vh] flex-row items-center justify-center">
<HiveLogo animated={false} className="size-16 animate-pulse" />
</div>
</>

View file

@ -1049,9 +1049,9 @@ const ActiveSchemaCheck = (props: {
if (query.fetching || query.stale) {
return (
<div className="flex h-fit flex-1 items-center justify-center self-center">
<div className="flex flex-col items-center">
<Spinner className="size-12" />
<div className="mt-3">Loading Schema Check...</div>
<div className="flex flex-col items-center text-sm text-gray-500">
<Spinner className="mb-3 size-8" />
Loading Schema Check...
</div>
</div>
);

View file

@ -213,7 +213,7 @@ function ExplorerPageContent(props: {
)}
</div>
</div>
{!query.fetching && (
{!query.fetching && !query.stale && (
<>
{latestValidSchemaVersion?.explorer && latestSchemaVersion ? (
<>

View file

@ -583,14 +583,15 @@ function ActiveSchemaVersion(props: {
const { error } = query;
const isLoading = query.fetching;
const isLoading = query.fetching || query.stale;
const schemaVersion = query?.data?.target?.schemaVersion;
const projectType = query?.data?.project?.type;
if (isLoading || !schemaVersion || !projectType) {
return (
<div className="flex size-full items-center justify-center">
<Spinner />
<div className="flex size-full flex-col items-center justify-center self-center text-sm text-gray-500">
<Spinner className="mb-3 size-8" />
Loading schema version...
</div>
);
}

View file

@ -1103,7 +1103,7 @@ function LaboratoryPageContent(props: {
`}</style>
</Helmet>
{!query.fetching && (
{!query.fetching && !query.stale && (
<div
className={clsx(
'grow',

View file

@ -1069,26 +1069,26 @@ const subPages = [
key: 'general',
title: 'General',
},
{
key: 'cdn',
title: 'CDN Tokens',
},
{
key: 'registry-token',
title: 'Registry Tokens',
},
{
key: 'cdn',
title: 'CDN Tokens',
},
{
key: 'breaking-changes',
title: 'Breaking Changes',
},
{
key: 'base-schema',
title: 'Base Schema',
},
{
key: 'schema-contracts',
title: 'Schema Contracts',
},
{
key: 'base-schema',
title: 'Base Schema',
},
] as const;
type SubPage = (typeof subPages)[number]['key'];