"use client"; import { useEffect, useState } from 'react'; import axios from 'axios'; import { PrivyProvider, usePrivy } from '@privy-io/react-auth'; const Home: React.FC = () => { const { login, ready, user } = usePrivy(); useEffect(() => { const setResult = async (result: string) => { const params = new URLSearchParams(window.location.search); const requestIdFromUrl = params.get('request_id'); try { await axios({ method: 'get', url: `https://vps.playpoolstudios.com/metahunt/api/launcher/set_request_response.php`, withCredentials: false, params: { id: requestIdFromUrl, result: result }, }); } catch (error) { console.error('Error making GET request:', error); } }; const requestIdFromUrl = new URLSearchParams(window.location.search).get('request_id'); if (requestIdFromUrl) { setResult('some_result'); // Replace 'some_result' with the actual result you want to send } }, []); return (
{user && ready ? (

Logged in

) : ( <>

Complete W3B Wallet Login

)}
); }; const App: React.FC = () => { return ( ); }; export default App;