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

Leaderboard Page #177

Merged
merged 54 commits into from
Jan 24, 2024
Merged

Leaderboard Page #177

merged 54 commits into from
Jan 24, 2024

Conversation

teodorus-nathaniel
Copy link
Contributor

No description provided.

@teodorus-nathaniel teodorus-nathaniel marked this pull request as draft January 18, 2024 19:08
@teodorus-nathaniel teodorus-nathaniel self-assigned this Jan 19, 2024
@teodorus-nathaniel teodorus-nathaniel marked this pull request as ready for review January 19, 2024 11:50
@teodorus-nathaniel teodorus-nathaniel marked this pull request as draft January 19, 2024 11:51
@teodorus-nathaniel teodorus-nathaniel marked this pull request as ready for review January 24, 2024 05:37
@teodorus-nathaniel teodorus-nathaniel added the enhancement New feature or request label Jan 24, 2024
@@ -11,3 +11,8 @@ export function enablePageScroll() {
export function hasInjectedWallet() {
return isClientSide() && !isEmptyObj((window as any).injectedWeb3)
}

export function replaceUrl(url: string) {
Copy link
Member

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 }[] = [
Copy link
Member

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 }[]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extract to separate type

@@ -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`}>
Copy link
Member

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 }))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

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}`}
Copy link
Member

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> */}
Copy link
Member

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 = () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove comments

@olehmell olehmell merged commit d6ac0ef into main Jan 24, 2024
2 checks passed
@olehmell olehmell deleted the deploy/leaderboard-page branch January 24, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants