Skip to content

Commit

Permalink
fix: wip feed skeleton ui
Browse files Browse the repository at this point in the history
  • Loading branch information
sajald77 committed Mar 1, 2023
1 parent 6a3b388 commit 0a3eccf
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/components/layouts/SkeletonLayout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { Skeleton, SkeletonProps } from '@chakra-ui/react'

export const SkeletonLayout = (props: SkeletonProps) => {
return <Skeleton height="20px" width="100%" borderRadius="8px" {...props} />
}
1 change: 1 addition & 0 deletions src/components/layouts/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './CardLayout'
export * from './PageLayout'
export * from './SkeletonLayout'
export * from './StickToTop'
4 changes: 2 additions & 2 deletions src/pages/landing/feed/Contributions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ export const Contributions = () => {
width={{
base: '100%',
}}
maxWidth="600px"
maxWidth="500px"
/>
{index < contributions.length - 1 && (
<Divider
borderBottomWidth="2px"
maxWidth="600px"
maxWidth="500px"
color="brand.200"
/>
)}
Expand Down
12 changes: 12 additions & 0 deletions src/pages/landing/feed/components/ContributionActivityItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
import { HTMLChakraProps } from '@chakra-ui/system'

import { LightningIcon, SatoshiIconTilted } from '../../../../components/icons'
import { SkeletonLayout } from '../../../../components/layouts'
import { ExternalAccountLinkIcon } from '../../../../components/molecules'
import { renderFunderBadges } from '../../../../components/molecules/projectActivity/renderFunderBadges'
import {
Expand Down Expand Up @@ -156,3 +157,14 @@ export const ContributionActivityItem = ({
</Box>
)
}

export const ContributionActivityItemSkeleton = () => {
return (
<VStack w="full" maxWidth="500px">
<HStack w="full" justifyContent="space-between">
<SkeletonLayout width="20%" />
<SkeletonLayout width="10%" />
</HStack>
</VStack>
)
}

0 comments on commit 0a3eccf

Please sign in to comment.