@@ -4,17 +4,12 @@ import { Box, Button, Skeleton, Stack, Typography, useMediaQuery, useTheme } fro
44import { FormattedNumber } from 'src/components/primitives/FormattedNumber' ;
55import { Link , ROUTES } from 'src/components/primitives/Link' ;
66import { TokenIcon } from 'src/components/primitives/TokenIcon' ;
7- import { FormattedReservesAndIncentives } from 'src/hooks/pool/usePoolFormattedReserves' ;
87import { useGeneralStakeUiData } from 'src/hooks/stake/useGeneralStakeUiData' ;
98import { useMeritIncentives } from 'src/hooks/useMeritIncentives' ;
109import { useRootStore } from 'src/store/root' ;
1110import { GHO_SYMBOL } from 'src/utils/ghoUtilities' ;
1211
13- interface GhoBannerProps {
14- reserve ?: FormattedReservesAndIncentives ;
15- }
16-
17- export const SavingsGhoBanner = ( { reserve } : GhoBannerProps ) => {
12+ export const SavingsGhoBanner = ( ) => {
1813 const theme = useTheme ( ) ;
1914 const isCustomBreakpoint = useMediaQuery ( '(min-width:1125px)' ) ;
2015 const isMd = useMediaQuery ( theme . breakpoints . up ( 'xs' ) ) ;
@@ -23,7 +18,7 @@ export const SavingsGhoBanner = ({ reserve }: GhoBannerProps) => {
2318 const downToSm = useMediaQuery ( '(max-width:780px)' ) ;
2419
2520 const currentMarketData = useRootStore ( ( store ) => store . currentMarketData ) ;
26- const currentMarket = useRootStore ( ( store ) => store . currentMarket ) ;
21+
2722 const { data : meritIncentives , isLoading : meritIncentivesLoading } = useMeritIncentives ( {
2823 symbol : GHO_SYMBOL ,
2924 market : currentMarketData . market ,
@@ -36,7 +31,7 @@ export const SavingsGhoBanner = ({ reserve }: GhoBannerProps) => {
3631 const stakeData = stakeGeneralResult ?. [ 0 ] ;
3732
3833 if ( downToSm ) {
39- return < GhoSavingsBannerMobile reserve = { reserve } /> ;
34+ return < GhoSavingsBannerMobile /> ;
4035 }
4136
4237 return (
@@ -53,7 +48,7 @@ export const SavingsGhoBanner = ({ reserve }: GhoBannerProps) => {
5348 >
5449 < Stack
5550 component = { Link }
56- href = { ROUTES . reserveOverview ( reserve ?. underlyingAsset || '' , currentMarket ) }
51+ href = { ROUTES . sGHO }
5752 sx = { ( theme ) => ( {
5853 [ theme . breakpoints . up ( 780 ) ] : {
5954 height : '116px' ,
@@ -178,9 +173,8 @@ export const SavingsGhoBanner = ({ reserve }: GhoBannerProps) => {
178173 ) ;
179174} ;
180175
181- const GhoSavingsBannerMobile = ( { reserve } : GhoBannerProps ) => {
176+ const GhoSavingsBannerMobile = ( ) => {
182177 const currentMarketData = useRootStore ( ( store ) => store . currentMarketData ) ;
183- const currentMarket = useRootStore ( ( store ) => store . currentMarket ) ;
184178 const { data : meritIncentives , isLoading : meritIncentivesLoading } = useMeritIncentives ( {
185179 symbol : GHO_SYMBOL ,
186180 market : currentMarketData . market ,
@@ -206,7 +200,7 @@ const GhoSavingsBannerMobile = ({ reserve }: GhoBannerProps) => {
206200 >
207201 < Stack
208202 component = { Link }
209- href = { ROUTES . reserveOverview ( reserve ?. underlyingAsset || '' , currentMarket ) }
203+ href = { ROUTES . sGHO }
210204 sx = { ( theme ) => ( {
211205 [ theme . breakpoints . up ( 780 ) ] : {
212206 height : '116px' ,
@@ -279,13 +273,7 @@ const GhoSavingsBannerMobile = ({ reserve }: GhoBannerProps) => {
279273 </ Typography >
280274 </ Stack >
281275 </ Stack >
282- < Button
283- variant = "contained"
284- fullWidth
285- component = { Link }
286- size = "medium"
287- href = { ROUTES . reserveOverview ( reserve ?. underlyingAsset || '' , currentMarket ) }
288- >
276+ < Button variant = "contained" fullWidth component = { Link } size = "medium" href = { ROUTES . sGHO } >
289277 < Trans > View details</ Trans >
290278 </ Button >
291279 </ Stack >
0 commit comments