diff --git a/website/src/pages/account/index.tsx b/website/src/pages/account/index.tsx index 51f7ed38..9f8dc4a3 100644 --- a/website/src/pages/account/index.tsx +++ b/website/src/pages/account/index.tsx @@ -2,24 +2,10 @@ import { Button } from "@chakra-ui/react"; import Head from "next/head"; import Link from "next/link"; import { useSession } from "next-auth/react"; -import React, { useState } from "react"; +import React from "react"; export default function Account() { const { data: session } = useSession(); - const [username, setUsername] = useState("null"); - - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const handleUpdate = async () => { - const response = await fetch("../api/update", { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify({ username }), - }); - const { name } = await response.json(); - setUsername(name); - }; if (!session) { return; @@ -34,7 +20,7 @@ export default function Account() { />
-

{username}

+

{session.user.name || "No username"}