Skip to content

Commit

Permalink
chore: add phantom wallet button
Browse files Browse the repository at this point in the history
  • Loading branch information
tuanddd committed Mar 3, 2023
1 parent d34d9a9 commit 8886cb7
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 7 deletions.
Binary file added public/assets/images/phantom-ghost-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/images/phantom-text-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/ui/components/ConnectButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const ConnectButton = () => {
<button
onClick={show}
type="button"
className="btn btn-primary-pink btn-md"
className="flex-1 justify-center btn btn-primary-pink btn-md"
>
{isConnected ? ensName ?? truncatedAddress : "connect wallet"}
</button>
Expand Down
38 changes: 32 additions & 6 deletions src/ui/hud/Boot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,29 @@ import { SceneKey } from "constants/scenes";
import { ConnectButton } from "ui/components/ConnectButton";
import { useModal } from "connectkit";

function PhantomWalletButton() {
return (
<button
className="flex-1 flex justify-center gap-x-2 items-center bg-#5122E0 rounded px-5 py-0"
disabled
>
<img
className="w-5"
src="/assets/images/phantom-ghost-white.png"
alt=""
/>
<img
className="w-22"
src="/assets/images/phantom-text-white.png"
alt=""
/>
<span className="text-#481EC7 px-2 font-semibold bg-white rounded-full text-10px leading-none py-0.5">
Coming Soon
</span>
</button>
);
}

export const Boot = () => {
const { transitionTo, getNFTs, token } = useGameState();
const { setOpen } = useModal();
Expand All @@ -23,25 +46,28 @@ export const Boot = () => {
};

return (
<div className="fixed w-screen h-screen flex flex-col items-center justify-start space-y-4">
<div className="flex items-center mt-35vh gap-2">
<ConnectButton />
<div className="flex fixed flex-col justify-start items-center space-y-4 w-screen h-screen">
<div className="flex flex-col gap-2 mt-32vh">
<div className="flex flex-1 gap-2">
<ConnectButton />
<PhantomWalletButton />
</div>
<button
type="button"
disabled={!account.isConnected}
className="btn btn-primary-blue btn-md"
className="justify-center btn btn-primary-blue btn-md"
onClick={!token ? () => setOpen(true) : startGame}
>
{!account.isConnected ? (
<>Please connect Wallet to Start Game</>
) : !token ? (
<>
<div className="i-heroicons-pencil-solid text-white mr-2" />
<div className="mr-2 text-white i-heroicons-pencil-solid" />
Please Sign in with Ethereum to Start Game
</>
) : (
<>
<div className="i-heroicons-play-solid text-white mr-2" />
<div className="mr-2 text-white i-heroicons-play-solid" />
start game
</>
)}
Expand Down

0 comments on commit 8886cb7

Please sign in to comment.