import { signIn, signOut, useSession } from "next-auth/react"; import { getServerSession } from "next-auth/next"; import { authOptions } from "./api/auth/[...nextauth]"; const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"; export default function Testing({ sesi, data, progress, statusWatch }) { const { data: session, status } = useSession(); // console.log(progress); async function handleUpdate() { // const data = ; const res = await fetch("/api/update-user", { method: "POST", body: JSON.stringify({ name: session?.user.name, newData: { recentWatch: { id: parseInt(9280220), title: { romaji: "something title here", }, description: "lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, quod.", coverImage: { extraLarge: "this should be an image url", }, episode: { id: "first-id-yeah", time: 12344, }, }, }, }), headers: { "Content-Type": "application/json", }, }); // const data = await res.json(); // parse the response body as JSON // console.log(data.dat.id); console.log(res.status); } console.log(statusWatch); return (