Skip to content

Commit

Permalink
usequery fix
Browse files Browse the repository at this point in the history
  • Loading branch information
achowdhry-ripple committed Nov 6, 2024
1 parent 0c054d2 commit 5036059
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useContext, useEffect, useState } from 'react'
import { useContext, useState } from 'react'
import './styles.scss'

import { useTranslation } from 'react-i18next'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Link } from 'react-router-dom'
import { useTranslation } from 'react-i18next'
import { FC } from 'react'
import { Amount } from '../Amount'
import { localizeNumber } from '../../utils'
import Currency from '../Currency'
Expand All @@ -11,16 +10,16 @@ const parsePrice = (dollarPrice: string, xrpPrice: number): number => {
return Number((parsedDollar * xrpPrice).toFixed(6))
}

const TokenLogo: FC<{ token: any }> = ({ token }) =>
token.meta.token.icon ? (
const tokenLogo = (token) =>
token && token.meta?.token.icon ? (
<object data={token.meta.token.icon} className="result-row-icon">
<div className="result-row-icon" />
</object>
) : (
<div className="result-row-icon no-logo" />
)

const TokenName: FC<{ token: any }> = ({ token }) =>
const tokenName = (token) =>
token.meta.token.name && (
<div>
(
Expand Down Expand Up @@ -61,18 +60,19 @@ export const TokenSearchRow = ({
}: SearchResultRowProps): JSX.Element => {
const { t } = useTranslation()

console.log(token)
return (
<Link
to={`/token/${token.currency}.${token.issuer}`}
className="search-result-row"
onClick={onClick}
>
<div className="result-name-line">
<div className="result-logo">{TokenLogo(token)}</div>
<div className="result-logo">{tokenLogo(token)}</div>
<div className="result-currency">
<Currency currency={token.currency} />
</div>
<div className="result-token-name">{TokenName(token)}</div>
<div className="result-token-name">{tokenName(token)}</div>
<div className="metric-chip">
<Amount
value={{
Expand Down

0 comments on commit 5036059

Please sign in to comment.