Commit 42646003 authored by Jack Short's avatar Jack Short Committed by GitHub

style: correct collection loading (#5288)

* style: correct collection loading

* review comments
parent 321b8df3
import Column from 'components/Column'
import Row from 'components/Row'
import { Box } from 'nft/components/Box' import { Box } from 'nft/components/Box'
import { Column, Row } from 'nft/components/Flex'
import { useIsMobile } from 'nft/hooks' import { useIsMobile } from 'nft/hooks'
import { CollectionBannerLoading } from 'nft/pages/collection' import { CollectionBannerLoading } from 'nft/pages/collection'
import { COLLECTION_BANNER_HEIGHT } from 'nft/pages/collection' import { COLLECTION_BANNER_HEIGHT } from 'nft/pages/collection'
import { ScreenBreakpointsPaddings } from 'nft/pages/collection/index.css'
import styled from 'styled-components/macro'
import { ActivitySwitcherLoading } from './ActivitySwitcher' import { ActivitySwitcherLoading } from './ActivitySwitcher'
import { CollectionNftsAndMenuLoading } from './CollectionNfts' import { CollectionNftsAndMenuLoading } from './CollectionNfts'
import { CollectionStatsLoading } from './CollectionStats' import { CollectionStatsLoading } from './CollectionStats'
const CollectionDescriptionSection = styled(Column)`
${ScreenBreakpointsPaddings}
`
const CollectionAssets = styled(Box)`
${ScreenBreakpointsPaddings}
`
const StyledColumn = styled(Column)`
width: 100%;
`
const StyledRow = styled(Row)`
gap: 24px;
margin-bottom: 28px;
`
export const CollectionPageSkeleton = () => { export const CollectionPageSkeleton = () => {
const isMobile = useIsMobile() const isMobile = useIsMobile()
return ( return (
<Column width="full"> <StyledColumn>
<Box width="full" height={`${COLLECTION_BANNER_HEIGHT}`}> <Box width="full" height={`${COLLECTION_BANNER_HEIGHT}`}>
<CollectionBannerLoading /> <CollectionBannerLoading />
</Box> </Box>
<Column paddingX="32"> <CollectionDescriptionSection>
<CollectionStatsLoading isMobile={isMobile} /> <CollectionStatsLoading isMobile={isMobile} />
<Row gap="24" marginBottom="28"> <StyledRow>{ActivitySwitcherLoading}</StyledRow>
{ActivitySwitcherLoading} </CollectionDescriptionSection>
</Row> <CollectionAssets>
</Column>
<Box paddingX="48">
<CollectionNftsAndMenuLoading /> <CollectionNftsAndMenuLoading />
</Box> </CollectionAssets>
</Column> </StyledColumn>
) )
} }
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