We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b9fc06 commit 2dca5f2Copy full SHA for 2dca5f2
pages/_app.tsx
@@ -29,7 +29,7 @@ function App({ Component, pageProps }) {
29
const isSupportCurrentNetwork = SUPPORT_NETWORKS.includes(chainId)
30
const [backendVersion, setBackendVersion] = useState("err")
31
32
- const [, actions] = useAsync(async() => {
+ const [autoLoginState, actions] = useAsync(async() => {
33
if (!sigInLocal || !accountInLocal) return
34
const cachedProvider = await createProvider(undefined, (id) => dispatch({ type: "SET_CHAIN_ID", chainId: id }))
35
if (!cachedProvider) return
@@ -117,6 +117,7 @@ function App({ Component, pageProps }) {
117
118
119
const renderActionButton = () => {
120
+ if (!['success', 'error'].includes(autoLoginState.status)) return null
121
if (!sigInLocal || !accountInLocal) {
122
return (
123
<button
0 commit comments