Skip to content

Commit

Permalink
fix: key, declare
Browse files Browse the repository at this point in the history
  • Loading branch information
vien.nguyen2-tiki committed Oct 11, 2022
1 parent 9d95673 commit 728addc
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pages/tokens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const AllTokensPage: React.FC<NextPage> = _ => {
) : (
<div className="padding-bottom-sm">
{tokens?.map((item: Token, index: number) => {
return <TokenRow key={index} index={index + 1} token={item} />
return <TokenRow key={`${index}`} index={index + 1} token={item} />
})}
{/* <Pagination currentPage={currentPage} onChange={onPaginationChange} total={pagination.total} /> */}
</div>
Expand Down
41 changes: 41 additions & 0 deletions project.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,44 @@ interface Proposer {
powerPercentage: string
cumulativePowerPercentage: string
}

interface Token {
cataloged: boolean
contractAddressHash: string
decimals: string
holderCount: number
name: string
symbol: string
totalSupply: string
type: string
}

interface AstraHolder {
address: string
balance: string
txnCount: number
}

interface UseTokenHookData {
result: Token[]
hasNextPage: boolean
}

interface UseAstraHolderData {
result: AstraHolder[]
hasNextPage: boolean
}

interface TokenResponse {
hasNextPage: boolean
result: Token[]
}

interface TopAstraHolderResponse {
hasNextPage: boolean
nextPageParams: {
offset: number
page: number
}
result: AstraHolder[]
}
4 changes: 1 addition & 3 deletions views/tokens/TokenRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ import { LinkMaker } from 'utils/helper'
import styles from './style.module.scss'

type Props = {
key: string
index: number
token: Token
}

export default function TokenRow({ key, index, token }: Props) {
export default function TokenRow({ index, token }: Props) {
return (
<div
key={key}
className={clsx(
styles.rowBrief,
styles.tokenRow,
Expand Down

0 comments on commit 728addc

Please sign in to comment.