From f67823b3fc726e66aa8fa019f8ff28a99a674702 Mon Sep 17 00:00:00 2001 From: Majorfi Date: Thu, 7 Nov 2024 16:09:01 +0100 Subject: [PATCH] feat: solana --- components/apps/tokenlistooor/TokenListCard.tsx | 10 +++++----- utils/animations.ts | 13 ------------- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/components/apps/tokenlistooor/TokenListCard.tsx b/components/apps/tokenlistooor/TokenListCard.tsx index d7db691..cc9ed28 100644 --- a/components/apps/tokenlistooor/TokenListCard.tsx +++ b/components/apps/tokenlistooor/TokenListCard.tsx @@ -29,7 +29,7 @@ function TokenListCard({item, network}: {item: TTokenListItem; network: number}) unoptimized src={item.logoURI || ''} altSrc={ - (item.logoURI || '')?.startsWith('ipfs://') + (item.logoURI || '').startsWith('ipfs://') ? `https://ipfs.io/ipfs/${(item.logoURI || '').replace('ipfs://', '')}` : item.logoURI || '' } @@ -56,7 +56,7 @@ function TokenListCard({item, network}: {item: TTokenListItem; network: number})
{'Tokens '} - {`${formatAmount(network === -1 ? item.tokenCount : item?.metadata?.tokenCountPerChain?.[network] || 0, 0, 0)}`} + {`${formatAmount(network === -1 ? item.tokenCount : item.metadata.tokenCountPerChain[network] || 0, 0, 0)}`}
@@ -98,9 +98,9 @@ function LegacyTokenListCard({item}: {item: Partial}): ReactElem }): ReactElem
{'Last Update '} - {item?.timestamp ? dayjs().to(new Date(item.timestamp).valueOf()) : '-'} + {item.timestamp ? dayjs().to(new Date(item.timestamp).valueOf()) : '-'}
diff --git a/utils/animations.ts b/utils/animations.ts index f7b707c..93b0fe7 100644 --- a/utils/animations.ts +++ b/utils/animations.ts @@ -14,17 +14,4 @@ export const appWrapperVariants = { exit: {scale: 0.9, opacity: 0, transition: out} }; -export function scrollToTargetAdjusted(element: HTMLElement): void { - const headerOffset = 32; - if (!element) { - return; - } - const elementPosition = element.getBoundingClientRect().top; - const offsetPosition = elementPosition + window.scrollY - headerOffset; - window.scrollTo({ - top: Math.round(offsetPosition), - behavior: 'smooth' - }); -} - export default thumbnailVariants;