Skip to content

Commit 47ec420

Browse files
committed
fix: clean code
1 parent 9f5d624 commit 47ec420

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/modules/reserve-overview/ReserveTopDetailsWrapper.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
useTheme,
1212
} from '@mui/material';
1313
import { useRouter } from 'next/router';
14-
import { useState } from 'react';
1514
import { getMarketInfoById, MarketLogo } from 'src/components/MarketSwitcher';
1615
import { useWeb3Context } from 'src/libs/hooks/useWeb3Context';
1716
import { useRootStore } from 'src/store/root';
@@ -62,8 +61,6 @@ export const ReserveTopDetailsWrapper = ({ underlyingAsset }: ReserveTopDetailsP
6261
? iconSymbol
6362
: poolReserve!.underlyingToken.symbol;
6463

65-
const [tokenSymbol, setTokenSymbol] = useState(displayIconSymbol);
66-
6764
if (!poolReserve) {
6865
return null;
6966
}
@@ -76,13 +73,7 @@ export const ReserveTopDetailsWrapper = ({ underlyingAsset }: ReserveTopDetailsP
7673
{loading ? (
7774
<Skeleton variant="circular" width={40} height={40} sx={{ background: '#383D51' }} />
7875
) : (
79-
<img
80-
src={`/icons/tokens/${tokenSymbol}.svg`}
81-
onError={() => setTokenSymbol('default')}
82-
width="40px"
83-
height="40px"
84-
alt=""
85-
/>
76+
<img src={`/icons/tokens/${displayIconSymbol}.svg`} width="40px" height="40px" alt="" />
8677
)}
8778
</Box>
8879
);

0 commit comments

Comments
 (0)