@@ -3,13 +3,14 @@ import Image from 'next/image';
33import { Info } from 'lucide-react' ;
44import { useStakeState , useStakeActions } from '../_stores/stake-store-provider' ;
55import { formatCompactNumber , formatTokenAmount } from '@/lib/utils' ;
6- import { STAKING_APR , STAKING_NOW_HOLDERS } from './constants' ;
6+ import { STAKING_APR } from './constants' ;
77import LoadingThreeDotsJumping from '@/components/shared/loading-three-dots-jumping' ;
88import { useStakingConfig } from '@sodax/dapp-kit' ;
99import { UnstakeModeToggle } from './unstake-mode-toggle' ;
1010import { STAKE_MODE } from '../_stores/stake-store' ;
1111import { Loader2 } from 'lucide-react' ;
1212import { useStakeVaultApy } from '@/hooks/useStakeVaultApy' ;
13+ import { Tooltip , TooltipContent , TooltipTrigger } from '@/components/ui/tooltip' ;
1314
1415export function StakeStatsCard ( ) : React . JSX . Element {
1516 const {
@@ -61,7 +62,20 @@ export function StakeStatsCard(): React.JSX.Element {
6162 < div className = "justify-center text-clay text-(length:--body-small) leading-4" >
6263 ~{ formatTokenAmount ( totalUserXSodaValue , 18 ) } SODA
6364 </ div >
64- < Info className = "w-4 h-4 text-clay-light" />
65+ < Tooltip >
66+ < TooltipTrigger asChild >
67+ < button type = "button" >
68+ < Info className = "w-4 h-4 text-clay-light" /> { ' ' }
69+ </ button >
70+ </ TooltipTrigger >
71+ < TooltipContent
72+ side = "top"
73+ sideOffset = { 10 }
74+ className = "bg-white px-4 py-2 text-espresso rounded-full text-(length:--body-small)"
75+ >
76+ Approximate equivalent value in SODA{ ' ' }
77+ </ TooltipContent >
78+ </ Tooltip >
6579 { userXSodaBalance > 0n && < LoadingThreeDotsJumping /> }
6680 </ div >
6781 </ div >
@@ -70,7 +84,20 @@ export function StakeStatsCard(): React.JSX.Element {
7084 < div className = "justify-center text-espresso text-(length:--body-super-comfortable) font-bold leading-5" >
7185 { displayedApy . toFixed ( 2 ) } % APY
7286 </ div >
73- < Info className = "w-4 h-4 text-clay-light" />
87+ < Tooltip >
88+ < TooltipTrigger asChild >
89+ < button type = "button" >
90+ < Info className = "w-4 h-4 text-clay-light" /> { ' ' }
91+ </ button >
92+ </ TooltipTrigger >
93+ < TooltipContent
94+ side = "top"
95+ sideOffset = { 10 }
96+ className = "bg-white px-4 py-2 text-espresso rounded-full text-(length:--body-small)"
97+ >
98+ APY will change over time{ ' ' }
99+ </ TooltipContent >
100+ </ Tooltip > { ' ' }
74101 </ div >
75102 < div className = "justify-center text-clay text-(length:--body-small) font-normal leading-4" >
76103 { formatCompactNumber ( formatTokenAmount ( stakingInfo ?. totalStaked || 0n , 18 ) ) } total staked
@@ -92,10 +119,16 @@ export function StakeStatsCard(): React.JSX.Element {
92119
93120 < div className = "w-full flex justify-between items-center" >
94121 < div className = "flex flex-col gap-1" >
95- < div className = "justify-center text-clay text-[9px] font-medium uppercase leading-3" > STAKING NOW </ div >
122+ < div className = "justify-center text-clay text-[9px] font-medium uppercase leading-3" > MAX PENALTY </ div >
96123 < div className = "flex justify-start items-center gap-1" >
97- < div className = "text-espresso text-(length:--body-comfortable) font-bold leading-5" >
98- { STAKING_NOW_HOLDERS }
124+ < div className = "text-espresso text-lg font-semibold leading-5" >
125+ { isLoadingStakingConfig ? (
126+ < LoadingThreeDotsJumping />
127+ ) : stakingConfig ? (
128+ `${ Number ( stakingConfig . maxPenalty ) } %`
129+ ) : (
130+ '—'
131+ ) }
99132 </ div >
100133 </ div >
101134 </ div >
@@ -105,7 +138,30 @@ export function StakeStatsCard(): React.JSX.Element {
105138 < div className = "text-espresso text-(length:--body-comfortable) font-bold leading-5" >
106139 { isLoadingStakingConfig ? < LoadingThreeDotsJumping /> : '180 days' }
107140 </ div >
108- { shouldShowUnstakingPeriodInfo ? < Info className = "w-4 h-4 text-clay-light" /> : null }
141+ { shouldShowUnstakingPeriodInfo ? (
142+ < Tooltip >
143+ < TooltipTrigger asChild >
144+ < button type = "button" >
145+ < Info className = "w-4 h-4 text-clay-light" /> { ' ' }
146+ </ button >
147+ </ TooltipTrigger >
148+ < TooltipContent
149+ side = "top"
150+ sideOffset = { 10 }
151+ className = "bg-white px-4 py-2 text-espresso rounded-full text-(length:--body-small)"
152+ >
153+ < a
154+ href = "https://support.sodax.com/en/articles/13918114-how-do-i-unstake-soda-on-sodax-stake"
155+ target = "_blank"
156+ rel = "noopener noreferrer"
157+ className = "text-yellow-dark font-bold"
158+ >
159+ Faster unstaking options
160+ </ a > { ' ' }
161+ available
162+ </ TooltipContent >
163+ </ Tooltip >
164+ ) : null }
109165 </ div >
110166 </ div >
111167 </ div >
0 commit comments