diff --git a/src/components/StakeModal/StakeTokenInput/InputPanel.tsx b/src/components/StakeModal/StakeTokenInput/InputPanel.tsx index 4c1cc64..64b8feb 100644 --- a/src/components/StakeModal/StakeTokenInput/InputPanel.tsx +++ b/src/components/StakeModal/StakeTokenInput/InputPanel.tsx @@ -23,8 +23,9 @@ export function InputPanel({ amount, setAmount, balance }: InputPanelProps) { setAmount(e.target.value)} + onChange={(e) => { setAmount(e.target.value) }} value={amount} />
diff --git a/src/components/StakeModal/StakeTokenInput/Stake.tsx b/src/components/StakeModal/StakeTokenInput/Stake.tsx index 9e4c903..2407fd9 100644 --- a/src/components/StakeModal/StakeTokenInput/Stake.tsx +++ b/src/components/StakeModal/StakeTokenInput/Stake.tsx @@ -33,7 +33,7 @@ export function Stake() { const { data: balance } = useQuery({ queryKey: ['balance', address], queryFn: async () => { - if (!address) return '0'; + if (!address) return; const res = await readContract({ ...MASK_TOKEN_CONTRACT, functionName: 'balanceOf', diff --git a/src/components/StakeRanking/index.tsx b/src/components/StakeRanking/index.tsx index d0d768e..3664986 100644 --- a/src/components/StakeRanking/index.tsx +++ b/src/components/StakeRanking/index.tsx @@ -1,4 +1,4 @@ -"use client" +'use client'; import { useQuery } from '@tanstack/react-query'; @@ -41,21 +41,33 @@ export function StakeRanking() { />
Staking Ranking
+<<<<<<< HEAD {rankingList?.length ? : null} +======= + {rankingList?.length && ( + + )} +>>>>>>> 1622411913cfa06855ddd3de6f4f4250bf5aa55a
- {rankingList?.slice(1).map((item, index) => ( - - ))} + {rankingList + ?.slice(1) + .map((item, index) => ( + + ))}
); diff --git a/src/providers/StakeAPI.ts b/src/providers/StakeAPI.ts index 0beb6eb..2d873c8 100644 --- a/src/providers/StakeAPI.ts +++ b/src/providers/StakeAPI.ts @@ -21,12 +21,12 @@ type RankingItem = { twitter_username: string; }; -interface RankingListResponse{ +interface RankingListResponse { code: number; data: { - list: RankingItem[] - page:{cursor: string} - } + list: RankingItem[]; + page: { cursor: string }; + }; message: string; reason: string; }