launchzone / web3-react-modal

Login modal for web3-react
MIT License
0 stars 0 forks source link

loading indicator for long loading wallet #10

Closed Zergity closed 3 years ago

Zergity commented 3 years ago

e.g. Torus

CaoThien96 commented 3 years ago

Is it necessary to support loading in the library. Client can control loading show and hide simply by

const { account, active, activate, deactivate } = useWeb3React()
const [ loading, setLoading ] = useState(false)

onConnect(()=>{
  .......
  setLoading(true)
})

return (
   ...
  {!active && loading  && renderLoadingComp()}
)

@Zergity

Zergity commented 3 years ago

Is it necessary to support loading in the library. Client can control loading show and hide simply by

const { account, active, activate, deactivate } = useWeb3React()
const [ loading, setLoading ] = useState(false)

onConnect(()=>{
  .......
  setLoading(true)
})

return (
   ...
  {!active && loading  && renderLoadingComp()}
)

@Zergity

makes sense, let backlog this for now