Skip to content

Commit

Permalink
Fix/v3 (#610)
Browse files Browse the repository at this point in the history
* fix: low values

* fix: hide read more on desktop

* chore: remove log

Co-authored-by: Major <[email protected]>

---------

Co-authored-by: Major <[email protected]>
  • Loading branch information
w84april and Majorfi authored Nov 21, 2024
1 parent 19a7805 commit 98b7fd8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
6 changes: 6 additions & 0 deletions apps/common/components/Counter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ export function Counter({
onUpdate(value) {
let hasBeenSet = false;
valueRef.current = value;

if (value < 0.00001 && value > 0) {
node.textContent = '<0.00001';
return;
}

if (Number.isNaN(value) || value === 0) {
const formatedValue = formatAmount(0, idealDecimals, idealDecimals);
node.textContent = formatedValue;
Expand Down
12 changes: 7 additions & 5 deletions apps/landing/components/sections/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ export function About(): ReactElement {
}}>
<div className={'relative lg:mr-[400px]'}>
<p className={'mb-10 text-left font-aeonikFono text-3xl font-light text-white md:text-5xl'}>
{'WTF IS YEARN VAULT?'}
{'WTF IS A YEARN VAULT?'}
</p>
<div
className={cl(
'md:max-w-[720px] text-lg transition-all overflow-hidden leading-7',
isReadMore ? 'max-h-screen' : 'max-h-[160px] gradient-mask-b-10'
isReadMore
? 'max-h-screen'
: 'max-h-[160px] md:max-h-screen gradient-mask-b-10 md:gradient-mask-none'
)}>
<p className={cl('text-gray-400 to-indigo-400')}>
{
Expand All @@ -38,16 +40,16 @@ export function About(): ReactElement {
<br />

<p className={cl('text-gray-400')}>
{'Unlike a bank account - none of this takes place behind closed doors (no offence to doors).'}
{'Unlike a bank account - none of this takes place behind closed doors (no offence to doors). '}
{
'DeFiruns on public blockchains, so you are in control of your assets and can see where they are'
'DeFi runs on public blockchains, so you are in control of your assets and can see where they are'
}
{'at all times.'}
</p>
</div>
{isReadMore ? null : (
<button
className={'mt-6 text-lg font-light text-primary'}
className={'mt-6 text-lg font-light text-primary md:hidden'}
onClick={() => set_isReadMore(true)}>
{'Read more'}
</button>
Expand Down
2 changes: 1 addition & 1 deletion apps/vaults-v3/components/list/VaultsV3ListRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -578,14 +578,14 @@ export function VaultStakedAmount({currentVault}: {currentVault: TYDaemonVault})
currentVault.staking.available,
getToken
]);

return (
<div className={'flex flex-col pt-0 text-right md:pt-8'}>
<p
className={`yearn--table-data-section-item-value ${
isZero(staked.raw) ? 'text-neutral-400' : 'text-neutral-900'
}`}>
<RenderAmount
shouldFormatDust
value={staked.normalized}
symbol={currentVault.token.symbol}
decimals={currentVault.token.decimals}
Expand Down

0 comments on commit 98b7fd8

Please sign in to comment.