@ -11,7 +11,7 @@ import { toString } from '~/utils/wei'
const Home = ( ) = > {
const Home = ( ) = > {
const { push } = useRouter ( )
const { push } = useRouter ( )
const { t } = useTranslation ( )
const { t , i18n } = useTranslation ( )
const [ pledgeList , setPledgeList ] = useState ( [
const [ pledgeList , setPledgeList ] = useState ( [
{ day : 180 , rate : 1408 } ,
{ day : 180 , rate : 1408 } ,
@ -37,9 +37,24 @@ const Home = () => {
res . data && setPledgeList ( res . data )
res . data && setPledgeList ( res . data )
}
}
const renderTitle = ( ) = > {
if ( i18n . language === 'en' ) {
return (
< div className = 'tac mt-1 fz-17' > Up To < span className = 'fz-24 fz-wb-550' > 7 % < / span > of Referees Staking Rewards < / div >
)
}
if ( i18n . language === 'hk' ) {
return (
< div className = 'tac mt-1 fz-17' > 高 達 質 押 人 賺 取 的 < span className = 'fz-24 fz-wb-550' > 7 % < / span > < / div >
)
}
return < div className = 'tac mt-1 fz-17' > 高 达 质 押 人 赚 取 的 < span className = 'fz-24 fz-wb-550' > 7 % < / span > < / div >
}
useEffect ( ( ) = > {
useEffect ( ( ) = > {
getData ( )
getData ( )
} , [ ] )
} , [ ] )
return (
return (
< div className = "home" >
< div className = "home" >
< div className = "liner-box" >
< div className = "liner-box" >
@ -107,13 +122,13 @@ const Home = () => {
< div className = 'tac fz-18px fz-wb-550 mt-3' > { t ( 'Refer To Earn' ) } < / div >
< div className = 'tac fz-18px fz-wb-550 mt-3' > { t ( 'Refer To Earn' ) } < / div >
< div className = 'plr-1' >
< div className = 'plr-1' >
< div className = 'refer row-center' >
< img src = { require ( '~/assets/group.png' ) } className = 'img' alt = "" / >
< div className = 'box p-2' >
< div className = 'fz-wb-550 tac' > { t ( 'Up To 7% of Referees Staking Rewards' ) } < / div >
< div className = 'row-center mt-1 plr-1' onClick = { ( ) = > {
< div className = 'refer row-center' onClick = { ( ) = > {
push ( '/myPledge' )
push ( '/myPledge' )
} } >
} } >
< img src = { require ( '~/assets/group.png' ) } className = 'img' alt = "" / >
< div className = 'box plr-1' >
< div className = 'fz-wb-550 tac pt-1' > { renderTitle ( ) } < / div >
< div className = 'row-center mt-1 plr-1' >
< div className = 'tac fz-14' > { t ( 'By sharing your referral code and introducing your friends to SOFIL and stake, you can earn referral rewards and withdraw everyday.' ) } < / div >
< div className = 'tac fz-14' > { t ( 'By sharing your referral code and introducing your friends to SOFIL and stake, you can earn referral rewards and withdraw everyday.' ) } < / div >
< div className = 'iconfont icon-arrow fz-26' > < / div >
< div className = 'iconfont icon-arrow fz-26' > < / div >
< / div >
< / div >