Skip to content

Commit

Permalink
feat: hide top users in mobile post page
Browse files Browse the repository at this point in the history
  • Loading branch information
teodorus-nathaniel committed Jan 19, 2024
1 parent 629180b commit c736323
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/creators/MobileActiveStakingSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import TopUsersCard from './TopUsersCard'
export type MobileActiveStakingSectionProps = ComponentProps<'div'> & {
offsetX?: number
offsetY?: number
showTopUsers?: boolean
}

export default function MobileActiveStakingSection({
offsetX = -16,
offsetY = -12,
showTopUsers = true,
...props
}: MobileActiveStakingSectionProps) {
const isMobile = useIsMobileWidthOrDevice()
Expand All @@ -31,7 +33,7 @@ export default function MobileActiveStakingSection({
>
<MobileStakerRewardDashboard />
</div>
<TopUsersCard style={{ margin: `0 ${offsetX}px`, background: 'white' }} />
{showTopUsers && <TopUsersCard style={{ margin: `0 ${offsetX}px`, background: 'white' }} />}
</>
)
}
2 changes: 1 addition & 1 deletion src/components/posts/view-post/PostPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const InnerPostPage: NextPage<PostDetailsProps> = props => {
withVoteBanner
creatorDashboardSidebarType={{ name: 'post-page', space }}
>
<MobileActiveStakingSection />
<MobileActiveStakingSection showTopUsers={false} />
<HiddenPostAlert post={post.struct} />
<Section>
<div>
Expand Down

0 comments on commit c736323

Please sign in to comment.