From beeac6b64a6bb092784d8694ddf2a22adc418bf0 Mon Sep 17 00:00:00 2001 From: GamerBoss101 Date: Sun, 13 Apr 2025 03:41:10 -0400 Subject: [PATCH] Another Profile Update --- src/app/(app)/profile/page.tsx | 47 ++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/src/app/(app)/profile/page.tsx b/src/app/(app)/profile/page.tsx index 8749585..953ae74 100644 --- a/src/app/(app)/profile/page.tsx +++ b/src/app/(app)/profile/page.tsx @@ -5,10 +5,15 @@ import { useDevice } from "@/lib/context/DeviceContext"; function Mobile() { const { isAuthenticated, session } = useDevice(); + const [bio, setBio] = useState(session?.bio || ""); - const [bio, setBio] = useState(""); + useEffect(() => { + if (session) { + setBio(session.bio || ""); + } + }, [session]); - function handleBioSubmit(e: React.FormEvent) { + function handleSubmit(e: React.FormEvent) { e.preventDefault(); if (bio.length > 0) { const formData = new FormData(); @@ -29,11 +34,11 @@ function Mobile() { return (
-

+

Hi, {session?.username || ""}!!

-
+
{isAuthenticated && ( {uploadMessage}

)} */}
+ +
+