Skip to content

Commit

Permalink
Merge pull request #25 from lum-network/feature/lum-776
Browse files Browse the repository at this point in the history
[LUM-776-2] Leaderboard
  • Loading branch information
ThibaultJRD authored Aug 11, 2023
2 parents 0bf2a33 + ae081e9 commit d9e37e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/components/Leaderboard/Leaderboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const Leaderboard = (props: Props) => {
</div>
) : null}
</div>
{!(lumWallet && item.address === lumWallet.address) && totalDeposited && userRank && userRank.rank > item.rank ? (
{!(lumWallet && item.address === lumWallet.address) && totalDeposited && userRank && userRank.rank > item.rank && NumbersUtils.convertUnitNumber(userRank.amount) === totalDeposited ? (
<Button
className='deposit-more-btn'
to={`${NavigationConstants.POOLS}/${DenomsUtils.getNormalDenom(item.nativeDenom)}/${poolId}`}
Expand All @@ -101,6 +101,9 @@ const Leaderboard = (props: Props) => {
{I18n.t('leaderboard.depositBtn', { amount: Math.ceil(amount - totalDeposited), denom: DenomsUtils.getNormalDenom(item.nativeDenom).toUpperCase() })}
</Button>
) : null}
{!(lumWallet && item.address === lumWallet.address) && totalDeposited && userRank && userRank.rank > item.rank && NumbersUtils.convertUnitNumber(userRank.amount) !== totalDeposited ? (
<Button className='deposit-more-btn'>{I18n.t('leaderboard.newRanking')}</Button>
) : null}
</div>
);
};
Expand Down
1 change: 1 addition & 0 deletions src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -534,5 +534,6 @@ export default {
cta: 'See More',
notConnectedCta: 'Log in to see more',
depositBtn: 'Deposit {{ amount }} {{ denom }} to take his place',
newRanking: 'You new ranking will be displayed in a few minutes',
},
};
2 changes: 1 addition & 1 deletion src/pages/PoolDetails/PoolDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ import { useWindowSize } from 'hooks';
import { Error404 } from 'pages';
import { Dispatch, RootState } from 'redux/store';
import { DenomsUtils, Firebase, I18n, KeplrUtils, NumbersUtils, PoolsUtils, WalletUtils } from 'utils';
import { LeaderboardItemModel } from 'models';
import Skeleton from 'react-loading-skeleton';

import DrawDetailsModal from './components/DrawDetailsModal/DrawDetailsModal';

import './PoolDetails.scss';
import { LeaderboardItemModel } from 'models';

const PoolDetails = () => {
const { poolId, denom } = useParams<NavigationConstants.PoolsParams>();
Expand Down

0 comments on commit d9e37e7

Please sign in to comment.