Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Skeleton Flickering #187

Merged
merged 2 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/components/creators/TopUsersCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ function UserInfo({
</div>
<div className='d-flex flex-column' style={{ minWidth: 0 }}>
<ViewSpaceLink
containerClassName='d-flex'
className='d-flex'
style={{ minWidth: 0 }}
title={
<span
className='FontWeightMedium FontNormal'
Expand Down
2 changes: 1 addition & 1 deletion src/components/main/PageWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export const PageContent: FC<Props> = ({
<div {...sidebarStyles}>
<CreatorDashboardSidebar dashboardType={creatorDashboardSidebarType} />
{!isLargeDesktop && (
<div className='mt-3'>
<div className='mt-3 xl-hidden'>
<TopUsersCard />
</div>
)}
Expand Down
9 changes: 6 additions & 3 deletions src/components/spaces/ViewSpaceLink.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Link from 'next/link'
import React from 'react'
import React, { CSSProperties } from 'react'
import { SpaceStruct } from 'src/types'
import { spaceUrl } from '../urls'

Expand All @@ -9,22 +9,25 @@ type Props = {
hint?: string
className?: string
containerClassName?: string
style?: CSSProperties
containerStyle?: CSSProperties
}

export const ViewSpaceLink = React.memo(
({ space, title, hint, className, containerClassName }: Props) => {
({ space, title, hint, className, containerClassName, containerStyle, style }: Props) => {
if (!space.id || !title) return null

return (
<span
className={containerClassName}
style={containerStyle}
onClick={e => {
e.stopPropagation()
e.preventDefault()
}}
>
<Link href='/[spaceId]' as={spaceUrl(space)}>
<a className={'DfBlackLink ' + className} title={hint}>
<a className={'DfBlackLink ' + className} style={style} title={hint}>
{title}
</a>
</Link>
Expand Down
6 changes: 6 additions & 0 deletions src/styles/subsocial.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2239,6 +2239,12 @@ hr {
}
}

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

.\!FontTiny {
font-size: $font_tiny !important;
}
Expand Down