Skip to content

Commit

Permalink
feat: solana
Browse files Browse the repository at this point in the history
  • Loading branch information
Majorfi committed Nov 7, 2024
1 parent 775df1c commit f67823b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
10 changes: 5 additions & 5 deletions components/apps/tokenlistooor/TokenListCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 || ''
}
Expand All @@ -56,7 +56,7 @@ function TokenListCard({item, network}: {item: TTokenListItem; network: number})
<div className={'flex flex-row items-center justify-between px-4 py-2 transition-colors md:px-6'}>
<small>{'Tokens '}</small>
<b suppressHydrationWarning>
{`${formatAmount(network === -1 ? item.tokenCount : item?.metadata?.tokenCountPerChain?.[network] || 0, 0, 0)}`}
{`${formatAmount(network === -1 ? item.tokenCount : item.metadata.tokenCountPerChain[network] || 0, 0, 0)}`}
</b>
</div>
</div>
Expand Down Expand Up @@ -98,9 +98,9 @@ function LegacyTokenListCard({item}: {item: Partial<TTokenListItem>}): ReactElem
<Image
unoptimized
src={
item?.logoURI?.startsWith('ipfs://')
item.logoURI?.startsWith('ipfs://')
? `https://ipfs.io/ipfs/${(item.logoURI || '').replace('ipfs://', '')}`
: item?.logoURI || ''
: item.logoURI || ''
}
width={36}
height={36}
Expand All @@ -121,7 +121,7 @@ function LegacyTokenListCard({item}: {item: Partial<TTokenListItem>}): ReactElem
<div className={'border-y border-dashed border-neutral-200'}>
<div className={'flex flex-row items-center justify-between px-4 py-2 transition-colors md:px-6'}>
<small>{'Last Update '}</small>
<b>{item?.timestamp ? dayjs().to(new Date(item.timestamp).valueOf()) : '-'}</b>
<b>{item.timestamp ? dayjs().to(new Date(item.timestamp).valueOf()) : '-'}</b>
</div>
</div>
<div className={'border-y border-dashed border-neutral-200'}>
Expand Down
13 changes: 0 additions & 13 deletions utils/animations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit f67823b

Please sign in to comment.