Skip to content

Commit

Permalink
Merge pull request #238 from dappforce/improvement/progress-modal
Browse files Browse the repository at this point in the history
Fix top users card rendering weird skeleton because of hydration issue
  • Loading branch information
teodorus-nathaniel authored Feb 5, 2024
2 parents f71da4d + fb31b1a commit 1972570
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/components/main/PageWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import CreatorDashboardSidebar, {
} from '../creators/CreatorDashboardSidebar'
import TopUsersCard from '../creators/TopUsersCard'
import ProgressModal from '../leaderboard/ProgressModal'
import { useIsMobileWidthOrDevice, useResponsiveSize } from '../responsive'
import { useIsMobileWidthOrDevice } from '../responsive'
import { fullUrl } from '../urls/helpers'
import Section from '../utils/Section'

Expand Down Expand Up @@ -125,7 +125,6 @@ export const PageContent: FC<Props> = ({
// const myAddress = useMyAddress()

const isMobile = useIsMobileWidthOrDevice()
const { isLargeDesktop } = useResponsiveSize()
// const isPanels = leftPanel || rightPanel

const sidebarStyles: ComponentProps<'div'> = {
Expand Down Expand Up @@ -155,8 +154,8 @@ export const PageContent: FC<Props> = ({
</section>
) : (
<div className={clsx('DfSectionOuterContainer')}>
{creatorDashboardSidebarType && isLargeDesktop && (
<div {...sidebarStyles}>
{creatorDashboardSidebarType && (
<div {...sidebarStyles} className='xl-only'>
<div>
<TopUsersCard />
</div>
Expand Down Expand Up @@ -202,11 +201,9 @@ export const PageContent: FC<Props> = ({
{rightPanel === undefined && creatorDashboardSidebarType && (
<div {...sidebarStyles}>
<CreatorDashboardSidebar dashboardType={creatorDashboardSidebarType} />
{!isLargeDesktop && (
<div className='mt-3 xl-hidden'>
<TopUsersCard />
</div>
)}
<div className='mt-3 xl-hidden'>
<TopUsersCard />
</div>
{/* <OnBoardingSidebar hideOnBoardingSidebar={() => setShowOnBoardingSidebar(false)} /> */}
</div>
)}
Expand Down
6 changes: 6 additions & 0 deletions src/styles/subsocial.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2264,10 +2264,16 @@ hr {
}
}

.xl-only {
display: none;
}
@media screen and (min-width: 1200px) {
.xl-hidden {
display: none !important;
}
.xl-only {
display: block;
}
}

.\!FontTiny {
Expand Down

0 comments on commit 1972570

Please sign in to comment.