Commit 4cd43227 authored by tom's avatar tom

block page skeleton

parent 97df2e3d
import { Skeleton } from '@chakra-ui/react';
import { useRouter } from 'next/router'; import { useRouter } from 'next/router';
import React from 'react'; import React from 'react';
...@@ -93,17 +92,14 @@ const BlockPageContent = () => { ...@@ -93,17 +92,14 @@ const BlockPageContent = () => {
return ( return (
<> <>
{ blockQuery.isLoading ? <Skeleton h={{ base: 12, lg: 6 }} mb={ 6 } w="100%" maxW="680px"/> : <TextAd mb={ 6 }/> } <TextAd mb={ 6 }/>
{ blockQuery.isLoading ? ( <PageTitle
<Skeleton h={ 10 } w="300px" mb={ 6 }/> text={ `Block #${ blockQuery.data?.height }` }
) : ( backLinkUrl={ hasGoBackLink ? appProps.referrer : undefined }
<PageTitle backLinkLabel="Back to blocks list"
text={ `Block #${ blockQuery.data?.height }` } isLoading={ blockQuery.isPlaceholderData }
backLinkUrl={ hasGoBackLink ? appProps.referrer : undefined } />
backLinkLabel="Back to blocks list" { blockQuery.isPlaceholderData ? <SkeletonTabs tabs={ tabs }/> : (
/>
) }
{ blockQuery.isLoading ? <SkeletonTabs/> : (
<RoutedTabs <RoutedTabs
tabs={ tabs } tabs={ tabs }
tabListProps={ isMobile ? undefined : TAB_LIST_PROPS } tabListProps={ isMobile ? undefined : TAB_LIST_PROPS }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment