@@ -8,8 +8,7 @@ import { ThemeProps } from '@subwallet/extension-web-ui/types';
8
8
import { Button , Icon , Number , SwNumberProps , Tag , Tooltip } from '@subwallet/react-ui' ;
9
9
import CN from 'classnames' ;
10
10
import { ArrowsClockwise , ArrowsLeftRight , CopySimple , Eye , EyeSlash , PaperPlaneTilt , PlusMinus } from 'phosphor-react' ;
11
- import React , { useCallback , useEffect , useState } from 'react' ;
12
- import { useNavigate , useSearchParams } from 'react-router-dom' ;
11
+ import React , { useCallback , useState } from 'react' ;
13
12
import styled from 'styled-components' ;
14
13
15
14
type Props = ThemeProps & {
@@ -43,9 +42,6 @@ function Component (
43
42
const { isShowBalance } = useSelector ( ( state ) => state . settings ) ;
44
43
const [ reloading , setReloading ] = useState ( false ) ;
45
44
const { currencyData } = useSelector ( ( state ) => state . price ) ;
46
- const navigate = useNavigate ( ) ;
47
- const [ searchParams , setSearchParams ] = useSearchParams ( ) ;
48
- const openBuyTokens = searchParams . get ( 'openBuyTokens' ) || '' ;
49
45
50
46
const onChangeShowBalance = useCallback ( ( ) => {
51
47
saveShowBalance ( ! isShowBalance ) . catch ( console . error ) ;
@@ -60,13 +56,6 @@ function Component (
60
56
} ) ;
61
57
} , [ ] ) ;
62
58
63
- useEffect ( ( ) => {
64
- if ( openBuyTokens === 'true' ) {
65
- searchParams . delete ( 'openBuyTokens' ) ;
66
- navigate ( '/buy-tokens' , { replace : true } ) ;
67
- }
68
- } , [ openBuyTokens , onOpenBuyTokens , searchParams , navigate , setSearchParams ] ) ;
69
-
70
59
return (
71
60
< div className = { `tokens-upper-block ${ className } ${ isShrink ? '-shrink' : '' } ` } >
72
61
< div className = '__total-balance-value-container' >
0 commit comments