-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from Web3Auth/feat/embed-complete-logout
Feat/embed complete logout
- Loading branch information
Showing
12 changed files
with
398 additions
and
354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { useWallet } from "@/context/walletContext"; | ||
import useMintStore from "@/lib/store/mint"; | ||
import { HiExclamationCircle } from "react-icons/hi"; | ||
import { text } from "stream/consumers"; | ||
|
||
const LogoutPopup = ({ onCancel }: { | ||
onCancel: () => void; | ||
}) => { | ||
const { resetMintState } = useMintStore(); | ||
const { walletProvider } = useWallet(); | ||
|
||
const handleLogout = async () => { | ||
resetMintState(); | ||
await walletProvider?.disconnect(); | ||
}; | ||
|
||
return ( | ||
<div className="w-full flex flex-col gap-y-4 items-center justify-center"> | ||
<div className="text-center"> | ||
<p className="text-lg font-medium text-white">Confirm Logout</p> | ||
<p className="text-sm font-normal text-gray-300 text-center mt-1 mx-auto"> | ||
You will be logged out of your application and returned to the login | ||
screen. | ||
</p> | ||
</div> | ||
<div className="flex justify-center items-center grow gap-2 w-full px-5 py-3"> | ||
<button | ||
className="w-1/2 py-2 rounded-full cursor-pointer border border-gray-300 text-white text-base font-medium leading-normal" | ||
onClick={onCancel} | ||
> | ||
Cancel | ||
</button> | ||
<button | ||
className="w-1/2 py-2 bg-blue-600 rounded-full cursor-pointer border border-blue-700 text-white text-base font-medium leading-normal hover:bg-blue-700" | ||
onClick={handleLogout} | ||
> | ||
Logout | ||
</button> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default LogoutPopup; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.