diff --git a/website/src/pages/account/index.tsx b/website/src/pages/account/index.tsx index 51f7ed38..c05c2f67 100644 --- a/website/src/pages/account/index.tsx +++ b/website/src/pages/account/index.tsx @@ -6,20 +6,6 @@ import React, { useState } 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"}