File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
src/components/incentives Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,7 @@ export const MerklIncentivesButton = (params: {
173173 protocolAction ?: ProtocolAction ;
174174 protocolAPY ?: number ;
175175 protocolIncentives ?: ReserveIncentiveResponse [ ] ;
176+ hideValue ?: boolean ;
176177} ) => {
177178 const [ open , setOpen ] = useState ( false ) ;
178179 const { data : merklIncentives } = useMerklIncentives ( params ) ;
@@ -197,7 +198,11 @@ export const MerklIncentivesButton = (params: {
197198 setOpen = { setOpen }
198199 open = { open }
199200 >
200- < Content incentives = { [ incentiveData ] } incentivesNetAPR = { incentiveAPR } />
201+ < Content
202+ incentives = { [ incentiveData ] }
203+ incentivesNetAPR = { incentiveAPR }
204+ hideValue = { params . hideValue }
205+ />
201206 </ ContentWithTooltip >
202207 ) ;
203208} ;
Original file line number Diff line number Diff line change @@ -111,6 +111,14 @@ export const IncentivesCard = ({
111111 const isSghoPage =
112112 typeof router ?. asPath === 'string' && router . asPath . toLowerCase ( ) . startsWith ( '/sgho' ) ;
113113 const hideMeritValue = symbol === 'GHO' && ! isSghoPage ;
114+ const isMarketsOrDashboardPage =
115+ typeof router ?. pathname === 'string' &&
116+ ( router . pathname . startsWith ( '/dashboard' ) || router . pathname . startsWith ( '/markets' ) ) ;
117+ // Hide GHO Merkl value on dashboard/markets; show only the badge icon.
118+ const hideMerklValue =
119+ symbol === 'GHO' &&
120+ ( protocolAction === ProtocolAction . borrow || protocolAction === ProtocolAction . supply ) &&
121+ isMarketsOrDashboardPage ;
114122
115123 const incentivesContent = (
116124 < >
@@ -136,6 +144,7 @@ export const IncentivesCard = ({
136144 protocolAction = { protocolAction }
137145 protocolAPY = { protocolAPY }
138146 protocolIncentives = { incentives || [ ] }
147+ hideValue = { hideMerklValue }
139148 />
140149 < EthenaIncentivesButton rewardedAsset = { address } />
141150 < EtherfiIncentivesButton symbol = { symbol } market = { market } protocolAction = { protocolAction } />
You can’t perform that action at this time.
0 commit comments