Skip to content

Commit

Permalink
Fix mobile web skeletons
Browse files Browse the repository at this point in the history
  • Loading branch information
DejayJD committed Oct 17, 2024
1 parent ee775d1 commit 3c5f69e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const CommentSectionContent = () => {
return (
<Flex direction='row' gap='s' alignItems='center'>
<Skeleton w={40} h={40} css={{ borderRadius: 100 }} />
<Flex gap='s'>
<Flex gap='s' direction='column'>
<Skeleton h={20} w={240} />
<Skeleton h={20} w={160} />
</Flex>
Expand Down
41 changes: 18 additions & 23 deletions packages/web/src/components/comments/CommentSkeletons.tsx
Original file line number Diff line number Diff line change
@@ -1,34 +1,29 @@
import { Divider, Flex, Paper, Skeleton } from '@audius/harmony'

import { CommentHeader } from './CommentHeader'
import { Flex, Skeleton } from '@audius/harmony'

const CommentBlockSkeleton = () => (
<Flex direction='row' gap='s' alignItems='center' p='l'>
<Skeleton w={40} h={40} css={{ borderRadius: 100 }} />
<Flex gap='s'>
<Skeleton w={20} h={240} />
<Skeleton w={20} h={160} />
<Skeleton w={40} h={40} css={{ borderRadius: 100, flexShrink: 0 }} />
<Flex gap='s' direction='column'>
<Skeleton h={20} w={240} />
<Skeleton h={20} w={160} />
</Flex>
</Flex>
)

// TODO: mobile can also go in here
export const CommentSkeletons = () => (
<Flex gap='l' direction='column' w='100%' alignItems='flex-start'>
<CommentHeader isLoading />
<Paper p='xl' w='100%' direction='column' gap='xl'>
<Flex
gap='s'
w='100%'
h='60px'
alignItems='center'
justifyContent='center'
>
<Skeleton w='40px' h='40px' css={{ borderRadius: '100%' }} />
<Skeleton w='100%' h='60px' />
</Flex>
<Divider color='default' orientation='horizontal' />
<CommentBlockSkeleton />
</Paper>
<Flex
gap='s'
direction='column'
w='100%'
h='100%'
alignItems='flex-start'
mt='s'
>
<CommentBlockSkeleton />
<CommentBlockSkeleton />
<CommentBlockSkeleton />
<CommentBlockSkeleton />
<CommentBlockSkeleton />
</Flex>
)
5 changes: 4 additions & 1 deletion packages/web/src/pages/track-page/TrackCommentsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ export const TrackCommentsPage = () => {
return (
<MobilePageContainer
title={messages.title}
css={(theme) => ({ backgroundColor: theme.color.background.white })}
css={(theme) => ({
backgroundColor: theme.color.background.white,
height: '100%'
})}
>
{comments_disabled ? (
<Flex p='2xl' justifyContent='center'>
Expand Down

0 comments on commit 3c5f69e

Please sign in to comment.