forked from MystenLabs/sui
-
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.
[frenemies] Signup flow (MystenLabs#7622)
- Loading branch information
1 parent
c2d5e2c
commit 8c60703
Showing
10 changed files
with
223 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,3 +50,4 @@ yarn-error.log* | |
|
||
# misc | ||
*.key | ||
.env |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,8 +1,41 @@ | ||
// Copyright (c) Mysten Labs, Inc. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { ConnectButton } from "@mysten/wallet-kit"; | ||
import { ConnectButton, useWalletKit } from "@mysten/wallet-kit"; | ||
import { useEffect } from "react"; | ||
import { useNavigate } from "react-router-dom"; | ||
import { Card } from "../components/Card"; | ||
|
||
export function Connect() { | ||
return <ConnectButton />; | ||
const navigate = useNavigate(); | ||
const { currentAccount } = useWalletKit(); | ||
|
||
useEffect(() => { | ||
if (currentAccount) { | ||
navigate("/setup", { replace: true }); | ||
} | ||
}, [currentAccount]); | ||
|
||
return ( | ||
<div className="max-w-4xl w-full mx-auto text-center"> | ||
<Card spacing="xl"> | ||
<h1 className="text-steel-darker text-2xl leading-tight font-semibold mb-5"> | ||
Welcome to Sui Frenemies game | ||
</h1> | ||
<img src="/capy_cowboy.svg" className="mb-5 h-64 w-64 mx-auto" /> | ||
<div className="text-steel-dark uppercase leading-tight mb-1"> | ||
Your Objective | ||
</div> | ||
<p className="text-steel-dark text-sm max-w-xs mb-12 mx-auto"> | ||
The goal of the game is to stake Sui tokens to move your assigned | ||
Validator to one of three designated positions: Friend (top third), | ||
Neutral (middle third), or Foe (bottom third). | ||
</p> | ||
<ConnectButton | ||
connectText="Connect Wallet to participate" | ||
className="!bg-frenemies !text-white !shadow-notification !leading-none !px-5 !py-3 " | ||
/> | ||
</Card> | ||
</div> | ||
); | ||
} |
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.