{info["Username"]}
About me :
woops...
import { useState, useEffect } from 'react'; import { useRouter } from 'next/router'; import Dashboard from '../components/ui'; let url = process.env.NEXT_PUBLIC_URL export default function Profile() { const router = useRouter(); let [info, setInfo] = useState({}); useEffect(() => { let token = localStorage.getItem("Token"); let ps = async () => { setInfo(await fetch(`http://${url}/profile`, { headers: { "Authorization": `Bearer ${token}` }, mode: "cors" }).then(r => r.json())); } ps().catch(console.error); }, [router.isReady]); return (
About me :
woops...