Skip to content

Commit

Permalink
<EthereumBalances>: attempt to animate items conditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
darrylyeo committed Apr 15, 2023
1 parent 88ddfba commit a829f4d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/EthereumBalances.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@
}
$: animate = !showSmallValues && balances.length < 50
const tokensAreEqual = (token1, token2) =>
// token1.name === token2.name &&
token1.symbol === token2.symbol &&
Expand Down Expand Up @@ -187,8 +190,8 @@
on:click={() =>
selectedToken = selectedToken?.address === token.address ? undefined : token
}
in:scale
animate:flip|local={{duration: filteredBalances.length < 50 ? 500 : 0, delay: 300 * i / filteredBalances.length, easing: quintOut}}
in:scale={{ duration: animate ? 500 : 0 }}
animate:flip|local={{ duration: animate ? 500 : 0, delay: animate ? 300 * i / filteredBalances.length : 0, easing: quintOut }}
>
<TokenBalanceWithConversion
{tokenBalanceFormat}
Expand Down

1 comment on commit a829f4d

@vercel
Copy link

@vercel vercel bot commented on a829f4d Apr 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

blockhead – ./

blockhead-phi.vercel.app
blockhead-darrylyeo.vercel.app
blockhead-git-main-darrylyeo.vercel.app

Please sign in to comment.