import Head from "next/head"; import styles from "../styles/Home.module.css"; import Header from "./templates/header"; import Nav from "./templates/nav"; import Content from "./templates/content"; import Footer from "./templates/footer"; import { useState } from "react"; import { useSession, signIn, signOut } from "next-auth/react"; export default function Home() { const { data: session } = useSession(); const [profil, setProfil] = useState(); const py = (e, profil) => { e.preventDefault(); fetch("/api/spawn", { method: "POST", headers: { Accept: "application/json, text/plain, */*", "Content-Type": "application/json", }, body: JSON.stringify({ profil: profil }), }).then((res) => { console.log("data from api: ", res); document.getElementById("down").click(); }); }; if (session) { return (
Wastpol
{" "}
); } return (
Wastpol

Nie zalogowano



); }