Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
beyond009 committed May 8, 2024
1 parent f90a262 commit a7205e5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/components/EstimatedRewards/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import { writeContract } from 'wagmi/actions';
import RSS3 from '@/assets/logos/rss3.svg';
import TON from '@/assets/logos/ton.svg';
import { MainButton } from '@/components/MainButton.js';
import { REWARD_CONTRACT } from '@/constants/index.js';
import { POOL_ID,REWARD_CONTRACT } from '@/constants/index.js';
import { Image } from '@/esm/Image.js';
import { stakeAPI } from '@/providers/StakeAPI.js';
import { POOL_ID } from '@/constants/index.js';

interface EstimatedRewardsProps {
rewardToken: string;
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProfileCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import { useQuery } from '@tanstack/react-query';
import { useAccount } from 'wagmi';

import { POOL_ID } from '@/constants/index.js';
import { Image } from '@/esm/Image.js';
import { formatAddress } from '@/helpers/formatAddress.js';
import { stakeAPI } from '@/providers/StakeAPI.js';
import { POOL_ID } from '@/constants/index.js';

export function ProfileCard() {
const { address } = useAccount();
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProjectDetailCard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client';

import { useQuery } from '@tanstack/react-query';
import dayjs from 'dayjs';
import { useMemo } from 'react';
import { readContract } from 'wagmi/actions';

Expand All @@ -14,7 +15,6 @@ import { publicClient } from '@/configs/wagmiClient.js';
import { CHAIN_ID, POOL_ID, STAKE_MANAGER_CONTRACT } from '@/constants/index.js';
import { Image } from '@/esm/Image.js';
import { stakeAPI } from '@/providers/StakeAPI.js';
import dayjs from 'dayjs';

interface ProjectCardProps {
setIsOpen: (isOpen: boolean) => void;
Expand Down
8 changes: 4 additions & 4 deletions src/components/StakeRanking/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
"use client"

import { useQuery } from '@tanstack/react-query';

import { Staker } from '@/components/StakeRanking/Staker.js';
import { TopStaker } from '@/components/StakeRanking/TopStaker.js';
import { POOL_ID } from '@/constants/index.js';
import { Image } from '@/esm/Image.js';
import { formatAddress } from '@/helpers/formatAddress.js';
import { stakeAPI } from '@/providers/StakeAPI.js';
import { useQuery } from '@tanstack/react-query';

export function StakeRanking() {
const { data: rankingList } = useQuery({
Expand Down Expand Up @@ -40,12 +41,11 @@ export function StakeRanking() {
/>
<div className="z-10 text-[24px] font-bold text-neutrals2">Staking Ranking</div>
<div className="z-10 mt-[64px] flex w-full items-center justify-center">
{rankingList?.length &&
<TopStaker
{rankingList?.length ? <TopStaker
avatar={rankingList[0]?.twitter_image || '/maskAvatar.svg'}
name={rankingList[0]?.twitter_display_name || formatAddress(rankingList[0].address)}
amount={Number(rankingList[0]?.stake_amount) || 0}
/>}
/> : null}
</div>
<div className="mt-[28px] grid grid-cols-[repeat(auto-fill,minmax(90px,1fr))] gap-[28px]">
{rankingList?.slice(1).map((item, index) => (
Expand Down

0 comments on commit a7205e5

Please sign in to comment.