- {description} -
-+ {description} +
+- {error - ? 'Something went wrong. Please try again.' - : loading - ? 'You should get a signature request from your wallet, Approve it to continue.' - : 'You are logged in 🚀'} -
- ) : ( - - ); + return token && isConnected ? ( ++ {error + ? "Something went wrong. Please try again." + : loading + ? "You should get a signature request from your wallet, Approve it to continue." + : "You are logged in 🚀"} +
+ ) : ( + + ); }; diff --git a/src/components/Web3AuthProvider.tsx b/src/components/Web3AuthProvider.tsx index 750be61..9834c12 100644 --- a/src/components/Web3AuthProvider.tsx +++ b/src/components/Web3AuthProvider.tsx @@ -1,40 +1,40 @@ -'use client'; +"use client"; -import type { UserInfo } from '@web3auth/base'; -import type { Web3Auth } from '@web3auth/modal'; -import { createContext, useContext, useEffect, useState } from 'react'; +import type { UserInfo } from "@web3auth/base"; +import type { Web3Auth } from "@web3auth/modal"; +import { createContext, useContext, useEffect, useState } from "react"; const Web3AuthContext = createContext<{ - web3Auth: Web3Auth | null; - user: Partial