From 1ae274a658d0a705b698a8873c286ec73403b1a6 Mon Sep 17 00:00:00 2001
From: polwex <polwex@sortug.com>
Date: Thu, 15 May 2025 12:17:54 +0700
Subject: m

---
 src/pages/login.tsx | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

(limited to 'src/pages/login.tsx')

diff --git a/src/pages/login.tsx b/src/pages/login.tsx
index 2c9f643..13d3bd4 100644
--- a/src/pages/login.tsx
+++ b/src/pages/login.tsx
@@ -1,4 +1,5 @@
 import AuthScreen from "@/components/Login2";
+import ProfileScreen from "@/components/Profile";
 import { Link } from "waku";
 import db from "@/lib/db";
 import { getContextData } from "waku/middleware/context";
@@ -7,12 +8,13 @@ export default async function AuthPage() {
   const ctx = getContextData();
   console.log({ ctx });
   const data = await getData();
-
-  return (
-    <div>
-      <AuthScreen />
-    </div>
-  );
+  if (ctx.user) return <ProfileScreen user={ctx.user as any} />;
+  else
+    return (
+      <div>
+        <AuthScreen />
+      </div>
+    );
 }
 
 const getData = async () => {
-- 
cgit v1.2.3

