-
Notifications
You must be signed in to change notification settings - Fork 9
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
Leaderboard Page #177
Leaderboard Page #177
Conversation
5145b09
to
2ab6c05
Compare
2ab6c05
to
9adb11a
Compare
…eploy/leaderboard-page
src/utils/window.ts
Outdated
@@ -11,3 +11,8 @@ export function enablePageScroll() { | |||
export function hasInjectedWallet() { | |||
return isClientSide() && !isEmptyObj((window as any).injectedWeb3) | |||
} | |||
|
|||
export function replaceUrl(url: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to remove it. Unused function
import StatisticCard from './common/StatisticCard' | ||
import styles from './GeneralLeaderboardPage.module.sass' | ||
|
||
const stats: { title: string; value: (data: GeneralStatistics) => ReactNode; tooltip: string }[] = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create separate type
|
||
const stats: Record< | ||
string, | ||
{ title: string; value: (data: UserStatistics) => ReactNode; tooltip: string }[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extract to separate type
src/components/utils/Section.tsx
Outdated
@@ -20,7 +29,7 @@ export const Section = ({ title, level = 2, className, id, outerClassName, child | |||
} | |||
|
|||
return ( | |||
<div className={`${outerClassName} DfSectionOuter`}> | |||
<div className={`${outerClassName} ${withLargerMaxWidth && 'DfSectionLarger'} DfSectionOuter`}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use clsx
@@ -440,7 +388,7 @@ async function processSubscriptionEvent( | |||
|
|||
dispatch(fetchSuperLikeCounts({ postIds: [post.persistentId], reload: true })) | |||
if (staker.id === myAddress) { | |||
dispatch(fetchRewardReport({ address: myAddress, reload: true })) | |||
// dispatch(fetchRewardReport({ address: myAddress, reload: true })) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
src/components/utils/index.tsx
Outdated
const alignCss = center ? 'justify-content-center align-items-center' : '' | ||
return ( | ||
<div className={`d-flex w-100 h-100 pt-4 pb-3 ${alignCss}`} style={style}> | ||
<div | ||
className={`d-flex w-100 h-100 ${withPadding ? 'pt-4 pb-3' : ''} ${alignCss} ${className}`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use clsx
</div> | ||
<div className='d-flex align-items-center justify-content-between GapSmall mt-auto'> | ||
<span className={styles.StatisticNumber}>{value}</span> | ||
{/* <MutedSpan>+25 today</MutedSpan> */} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove?
const { | ||
state: { collapsed }, | ||
} = useSidebarCollapsed() | ||
// const HomeNav = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove comments
No description provided.