diff --git a/app/login/page.tsx b/app/login/page.tsx index 704ba3f..f8e4e94 100644 --- a/app/login/page.tsx +++ b/app/login/page.tsx @@ -6,12 +6,15 @@ import GoogleSignInButton from '../firebase/components/GoogleSignInButton'; import { useRouter } from 'next/navigation'; import { LoginSologin, RegisterSologin } from '../sologin'; import SignInWithGithub from '../firebase/components/GithubSignInButton'; +import Button from '../widgets/LoginButton'; +import Head from 'next/head'; const AuthTabs = () => { const [activeTab, setActiveTab] = useState<'signin' | 'signup'>('signin'); const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [error, setError] = useState(null); + const [isModalOpen, setIsModalOpen] = useState(false); const router = useRouter(); const onAuthSuccess = () => { @@ -34,6 +37,7 @@ const AuthTabs = () => { setEmail(''); setPassword(''); setError(null); + setIsModalOpen(false); // Close the modal on success } catch (err: any) { const errorCode = err.code; switch (errorCode) { @@ -53,88 +57,114 @@ const AuthTabs = () => { }; return ( -
-
-
- - + <> + + Login · W3B Games + + + +
+
+
+
-
-
- - setEmail(e.target.value)} - required - /> +
+

+ METAHUNT +

+
+
+ +
+
+
+
+
+
+
-
- - setPassword(e.target.value)} - required - /> -
- - -
+
+
- - -
- - {/* Error Dialog */} - {error && ( -
-
-

Error

-

{error}

+ {/* Modal */} + {isModalOpen && ( +
+
+
+ + +
+
+
+ + setEmail(e.target.value)} + required + /> +
+
+ + setPassword(e.target.value)} + required + /> +
+ +
+
+ +
)} -
+ ); }; diff --git a/app/widgets/LoginButton.tsx b/app/widgets/LoginButton.tsx new file mode 100644 index 0000000..29b1e24 --- /dev/null +++ b/app/widgets/LoginButton.tsx @@ -0,0 +1,21 @@ +import React from 'react'; + +interface ButtonProps { + onClick: () => void; + text: string; +} + +const Button: React.FC = ({ onClick, text }) => { + return ( + + ); +}; + +export default Button; \ No newline at end of file diff --git a/public/favicons/android-chrome-192x192.png b/public/favicons/android-chrome-192x192.png new file mode 100644 index 0000000..62e3ac7 Binary files /dev/null and b/public/favicons/android-chrome-192x192.png differ diff --git a/public/favicons/android-chrome-512x512.png b/public/favicons/android-chrome-512x512.png new file mode 100644 index 0000000..3ea8b58 Binary files /dev/null and b/public/favicons/android-chrome-512x512.png differ diff --git a/public/favicons/apple-touch-icon.png b/public/favicons/apple-touch-icon.png new file mode 100644 index 0000000..e9e9456 Binary files /dev/null and b/public/favicons/apple-touch-icon.png differ diff --git a/public/favicons/favicon.ico b/public/favicons/favicon.ico new file mode 100644 index 0000000..fd210cb Binary files /dev/null and b/public/favicons/favicon.ico differ diff --git a/public/favicons/icon.svg b/public/favicons/icon.svg new file mode 100644 index 0000000..9e310ea --- /dev/null +++ b/public/favicons/icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/favicons/manifest.json b/public/favicons/manifest.json new file mode 100644 index 0000000..620d384 --- /dev/null +++ b/public/favicons/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "Privy Auth Demo", + "icons": [ + {"src": "/favicons/android-chrome-192x192.png", "type": "image/png", "sizes": "192x192"}, + {"src": "/favicons/android-chrome-512x512.png", "type": "image/png", "sizes": "512x512"} + ] +} diff --git a/public/fonts/AdelleSans-Regular.woff b/public/fonts/AdelleSans-Regular.woff new file mode 100644 index 0000000..c316818 Binary files /dev/null and b/public/fonts/AdelleSans-Regular.woff differ diff --git a/public/fonts/AdelleSans-Regular.woff2 b/public/fonts/AdelleSans-Regular.woff2 new file mode 100644 index 0000000..08f5ba7 Binary files /dev/null and b/public/fonts/AdelleSans-Regular.woff2 differ diff --git a/public/fonts/AdelleSans-Semibold.woff b/public/fonts/AdelleSans-Semibold.woff new file mode 100644 index 0000000..2559f53 Binary files /dev/null and b/public/fonts/AdelleSans-Semibold.woff differ diff --git a/public/fonts/AdelleSans-Semibold.woff2 b/public/fonts/AdelleSans-Semibold.woff2 new file mode 100644 index 0000000..58fe576 Binary files /dev/null and b/public/fonts/AdelleSans-Semibold.woff2 differ diff --git a/public/images/avatar.png b/public/images/avatar.png new file mode 100644 index 0000000..07827e5 Binary files /dev/null and b/public/images/avatar.png differ diff --git a/public/json/game-data-abi.json b/public/json/game-data-abi.json new file mode 100644 index 0000000..46b949e --- /dev/null +++ b/public/json/game-data-abi.json @@ -0,0 +1,593 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC1155InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC1155InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "idsLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "valuesLength", + "type": "uint256" + } + ], + "name": "ERC1155InvalidArrayLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC1155InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC1155InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC1155InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC1155MissingApprovalForAll", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [], + "name": "PP", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SafeCoins", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "TOURNAMENT_TICKETS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "TOURNAMENT_TROPHIES", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "buyTickets", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newPrice", + "type": "uint256" + } + ], + "name": "setTicketPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ticketPrice", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenid", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/public/logos/logo.png b/public/logos/logo.png new file mode 100644 index 0000000..a6b5aa9 Binary files /dev/null and b/public/logos/logo.png differ diff --git a/public/logos/privy-logo.png b/public/logos/privy-logo.png new file mode 100644 index 0000000..13853de Binary files /dev/null and b/public/logos/privy-logo.png differ diff --git a/public/logos/privy-logomark.png b/public/logos/privy-logomark.png new file mode 100644 index 0000000..1d7dcba Binary files /dev/null and b/public/logos/privy-logomark.png differ