@ -22,9 +22,9 @@ const ConnectWalletButton = (props: ConnectWalletButtonProps) => {
const [ visible , setVisible ] = useState ( false )
const [ visible , setVisible ] = useState ( false )
const { copyVal } = useCopyLink ( )
const { copyVal } = useCopyLink ( )
const [ contractCount , setContractCount ] = useState ( 0 )
const [ contractCount , setContractCount ] = useState ( 0 )
const { t } = useTranslation ( )
const { t } = useTranslation ( )
const connectWallet = async ( ) = > {
const connectWallet = async ( ) = > {
setLoading ( true ) ;
setLoading ( true ) ;
@ -49,9 +49,9 @@ const ConnectWalletButton = (props: ConnectWalletButtonProps) => {
setContractCount ( _record . length )
setContractCount ( _record . length )
}
}
useEffect ( ( ) = > {
useEffect ( ( ) = > {
walletAddress && visible && getData ( )
walletAddress && visible && getData ( )
} , [ walletAddress , visible ] )
} , [ walletAddress , visible ] )
return (
return (
< div className = "connect-button" >
< div className = "connect-button" >
@ -87,7 +87,7 @@ const ConnectWalletButton = (props: ConnectWalletButtonProps) => {
< div >
< div >
< img src = { require ( '~/assets/fil.png' ) } className = 'header-fil' alt = "" / >
< img src = { require ( '~/assets/fil.png' ) } className = 'header-fil' alt = "" / >
< / div >
< / div >
< div className = 'ml-2 ' >
< div className = 'ml-1 ' >
< div > Filecoin ( FIL ) < / div >
< div > Filecoin ( FIL ) < / div >
< div className = 'mt-5px' > { t ( 'Balance' ) } : { filBalance } FIL < / div >
< div className = 'mt-5px' > { t ( 'Balance' ) } : { filBalance } FIL < / div >
< / div >
< / div >
@ -96,7 +96,7 @@ const ConnectWalletButton = (props: ConnectWalletButtonProps) => {
< div >
< div >
< img src = { require ( '~/assets/contract.png' ) } className = 'header-fil' alt = "" / >
< img src = { require ( '~/assets/contract.png' ) } className = 'header-fil' alt = "" / >
< / div >
< / div >
< div className = 'ml-2 ' >
< div className = 'ml-1 ' >
< div > { t ( 'SOFIL Staking Contract' ) } < / div >
< div > { t ( 'SOFIL Staking Contract' ) } < / div >
< div className = 'mt-5px' > { t ( 'Staking Amount' ) } : { contractCount } < / div >
< div className = 'mt-5px' > { t ( 'Staking Amount' ) } : { contractCount } < / div >
< / div >
< / div >
@ -104,12 +104,12 @@ const ConnectWalletButton = (props: ConnectWalletButtonProps) => {
< div className = 'header-divider mt-3' > < / div >
< div className = 'header-divider mt-3' > < / div >
< div className = 'row-center mt-2' onClick = { ( ) = > toPath ( '/myPledge' ) } >
< div className = 'row-center mt-2' onClick = { ( ) = > toPath ( '/myPledge' ) } >
< img src = { require ( '~/assets/pledge.png' ) } className = 'header-pledge-img' alt = "" / >
< img src = { require ( '~/assets/pledge.png' ) } className = 'header-pledge-img' alt = "" / >
< div className = '' > { t ( 'My Staking' ) } < / div >
< div className = 'ml-1 ' > { t ( 'My Staking' ) } < / div >
< / div >
< / div >
< div className = 'header-divider mt-2' > < / div >
< div className = 'header-divider mt-2' > < / div >
< div className = 'row-center mt-2' onClick = { ( ) = > toPath ( '/invitation' ) } >
< div className = 'row-center mt-2' onClick = { ( ) = > toPath ( '/invitation' ) } >
< img src = { require ( '~/assets/recommend.png' ) } className = 'header-recommend-img' alt = "" / >
< img src = { require ( '~/assets/recommend.png' ) } className = 'header-recommend-img' alt = "" / >
< div className = '' > { t ( 'My Referral' ) } < / div >
< div className = 'ml-1 ' > { t ( 'My Referral' ) } < / div >
< / div >
< / div >
< div className = 'header-divider mt-2' > < / div >
< div className = 'header-divider mt-2' > < / div >
< div className = 'mt-3 tac header-logout' onClick = { logout } > { t ( 'Log out' ) } < / div >
< div className = 'mt-3 tac header-logout' onClick = { logout } > { t ( 'Log out' ) } < / div >