diff --git a/pages/auth.tsx b/pages/auth.tsx index 3283c7f..9016e9e 100644 --- a/pages/auth.tsx +++ b/pages/auth.tsx @@ -54,24 +54,31 @@ const Home: React.FC = () => { }, [ready, user]); return ( -
+
{user && ready ? ( -
-

Login Success. You may close this now.

+
+

Login Successful!

+

Your W3B Launcher is now securely connected.

-
Go to Dashboard
+
+ Enter Dashboard +
- ) : ( - <> -
-

Complete W3B Wallet Login

- -
- - - +
+

Connect your W3B Games Launcher

+

Connect your crypto wallet to access the W3B Games ecosystem

+ +
)}
); diff --git a/pages/dashboard.tsx b/pages/dashboard.tsx index 45c182c..f340837 100644 --- a/pages/dashboard.tsx +++ b/pages/dashboard.tsx @@ -237,198 +237,197 @@ export default function DashboardPage() { } } + + return ( <> W3B Games Dashboard -
+
{ready && authenticated ? ( <> -
-

Welcome {username || "User"},

+
+

+ Welcome {username || "Crypto Warrior"}, +

-
-
-

Vault Credits

-

{vaultData.vc || "0"} VC

+
+
+

Vault Credits

+

{vaultData.vc || "0"} VC

-
-

{activeWallet}

-

{balance || 0} {token}

+
+

{token} Balance

+

{balance || 0} {token}

+

{activeWallet}

-
-

Hunt Tickets

-

{ticketsCount || "0"}

- +
+
+

Hunt Tickets

+

{ticketsCount || "0"}

+
+
+ +
-
-

Pre-hunt Points

-

{vaultData.prehp || "0"} PHP

+
+

Pre-hunt Points

+

{vaultData.prehp || "0"} PHP

-
-
-

Socials

-
- -
- -

Twitter

-
-
-

{user?.twitter ? "@" + user?.twitter.username : "-"}

-
-
- -
-
- -

Discord

-
-
-

{user?.discord ? "@" + user?.discord?.username : "-"}

-
-
- -
-
- -

Google

-
-
-

{user?.google ? "@" + user?.google?.email : "-"}

-
-
- +
+
+

Socials

+
+ {[ + { icon: faXTwitter, name: 'Twitter', user: user?.twitter, toggle: ToggleTwitter }, + { icon: faDiscord, name: 'Discord', user: user?.discord, toggle: ToggleDiscord }, + { icon: faGoogle, name: 'Google', user: user?.google, toggle: ToggleGoogle } + ].map((social) => ( +
+
+
+ +
+ {social.name} +
+
+ + {social.user ? `@${social.user.username || social.user.email}` : 'Not linked'} + + +
+
+ ))}
-
-

Wallets

-
-
-
{ handleWalletClick(getEmbeddedConnectedWallet(wallets)?.address ?? ""); }}> - -
-

W3B Wallet

-
-

{getEmbeddedConnectedWallet(wallets)?.address}

- -
- {/* */} - +
+

Wallets

+
+
handleWalletClick(getEmbeddedConnectedWallet(wallets)?.address ?? "")} + > + +
+

W3B Wallet

+

+ {getEmbeddedConnectedWallet(wallets)?.address} +

+
-
-
-
- { - wallets.map((wallet) => { - if (wallet.connectorType == "embedded") { return ""; } - const address = wallet.address; - return ( -
-
{ handleWalletClick(address) }}> - -
-

{wallet.walletClientType}

-
-

{wallet.address}

-
- {wallet.linked ? : - - } - -
+ {wallets.map((wallet) => { + if (wallet.connectorType == "embedded") return null; + const address = wallet.address; + return ( +
handleWalletClick(address)} + > + +
+

{wallet.walletClientType}

+

{wallet.address}

- ); - }) - } + {wallet.linked ? ( + + ) : ( + + )} +
+ ); + })} + +
-
-
{showPopup && ( -
-
-

Enter Ticket Amount

-
+
+
+

Buy Hunt Tickets

+
- setTicketAmount(Number(e.target.value))} - className="w-16 text-center text-white bg-black appearance-none" - style={{ - appearance: 'textfield', - WebkitAppearance: 'none', - MozAppearance: 'textfield', - }} - /> +
+ {ticketAmount} +
-
+
@@ -438,7 +437,9 @@ export default function DashboardPage() { )} ) : ( -

Loading...

+
+
+
)}
diff --git a/pages/index.tsx b/pages/index.tsx index f50e8fc..ed39b3c 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,13 +1,13 @@ -//import Portal from "../components/graphics/portal"; import { useLogin } from "@privy-io/react-auth"; import { PrivyClient } from "@privy-io/server-auth"; import { GetServerSideProps } from "next"; import Head from "next/head"; import { useRouter } from "next/router"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { faCube, faRocket } from "@fortawesome/free-solid-svg-icons"; export const getServerSideProps: GetServerSideProps = async ({ req }) => { const cookieAuthToken = req.cookies["privy-token"]; - // If no cookie is found, skip any further checks if (!cookieAuthToken) return { props: {} }; const PRIVY_APP_ID = process.env.NEXT_PUBLIC_PRIVY_APP_ID; @@ -16,8 +16,6 @@ export const getServerSideProps: GetServerSideProps = async ({ req }) => { try { const claims = await client.verifyAuthToken(cookieAuthToken); - // Use this result to pass props to a page for server rendering or to drive redirects! - // ref https://nextjs.org/docs/pages/api-reference/functions/get-server-side-props console.log({ claims }); return { @@ -38,21 +36,28 @@ export default function LoginPage() { return ( <> - Login · Privy + MetaHunt · Web3 Adventure -
-
-
-
- {/* */} +
+
+
+
+
-
+

+ Welcome to W3B Game Dashboard +

+

+ Embark on a Web3 adventure like no other +

+
diff --git a/pages/logincomplete.tsx b/pages/logincomplete.tsx index b962543..e54b3c7 100644 --- a/pages/logincomplete.tsx +++ b/pages/logincomplete.tsx @@ -48,28 +48,27 @@ export default function LoginComplete() { Complete Login -
-
-

Let's Complete your Login

-

Enter your unique username

-
+
+
+

Complete Your Login

+

Enter your unique username

+ + {error &&

{error}

} + - {error &&

{error}

} - -