diff --git a/pages/dashboard.tsx b/pages/dashboard.tsx
index 666dbf8..0962666 100644
--- a/pages/dashboard.tsx
+++ b/pages/dashboard.tsx
@@ -14,6 +14,7 @@ import { arbitrumSepolia, baseSepolia } from "viem/chains";
export default function DashboardPage() {
const [verifyResult, setVerifyResult] = useState(0);
const [username, setUsername] = useState('');
+ const [userId, setUserId] = useState(0);
const [vaultData, setVaultData] = useState({ prehp: "0", vc: "0" });
const [showPopup, setShowPopup] = useState(false);
const [ticketAmount, setTicketAmount] = useState(1);
@@ -111,6 +112,18 @@ export default function DashboardPage() {
}
}
+ async function fetchUserId(){
+ try {
+ const response = await fetch(`https://vps.playpoolstudios.com/metahunt/api/launcher/get_user_id.php?username=${user?.id}`);
+ const data = await response.text();
+ setUserId(parseInt(data));
+ } catch (error) {
+ console.error('Error fetching user ID:', error);
+ return null;
+ }
+ };
+
+ fetchUserId();
fetchUsername();
fetchVaultData();
}, [ready]);
@@ -237,8 +250,6 @@ export default function DashboardPage() {
}
}
-
-
return (
<>
@@ -246,12 +257,19 @@ export default function DashboardPage() {
- {ready && authenticated ? (
+ {ready && authenticated && userId >0 ? (
<>
-
- Welcome {username || "Crypto Warrior"},
-
+
+
+ Welcome {username || "Crypto Warrior"}
+
+
+
+
+