From 7818db770f179d412a5d1f59ac7f41f142a949f5 Mon Sep 17 00:00:00 2001 From: Nayan Sawyer <33187059+opus-tango@users.noreply.github.com> Date: Sun, 15 Mar 2026 09:47:13 -0400 Subject: [PATCH] add placeholder pages for people --- src/app/person/desktop.tsx | 7 +++++++ src/app/person/mobile.tsx | 7 +++++++ src/app/person/page.tsx | 31 +++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 src/app/person/desktop.tsx create mode 100644 src/app/person/mobile.tsx create mode 100644 src/app/person/page.tsx diff --git a/src/app/person/desktop.tsx b/src/app/person/desktop.tsx new file mode 100644 index 0000000..9876b99 --- /dev/null +++ b/src/app/person/desktop.tsx @@ -0,0 +1,7 @@ +export default function PersonDesktop() { + return ( +
+

Person

+
+ ); +} diff --git a/src/app/person/mobile.tsx b/src/app/person/mobile.tsx new file mode 100644 index 0000000..060d567 --- /dev/null +++ b/src/app/person/mobile.tsx @@ -0,0 +1,7 @@ +export default function PersonMobile() { + return ( +
+

Person

+
+ ); +} diff --git a/src/app/person/page.tsx b/src/app/person/page.tsx new file mode 100644 index 0000000..576e77b --- /dev/null +++ b/src/app/person/page.tsx @@ -0,0 +1,31 @@ +import { authClient } from "@/utils/auth-client"; +import PersonMobile from "./mobile"; +import PersonDesktop from "./desktop"; + +export default function PersonPage() { + const { data: session, isPending, error, refetch } = authClient.useSession(); + + // Handle session states + if (isPending) { + return
Loading...
; + } + if (error) { + return
Error: {error.message}
; + } + + // Get window width for responsive design + const width = typeof window !== "undefined" ? window.innerWidth : 0; + if (width === 0) { + return
Loading...
; + } + + // Render the mobile component if the window width is less than 768 + if (!isPending && session && width < 768) { + return ; + } + + // Render the desktop component if the window width is greater than or equal to 768 + if (!isPending && session && width >= 768) { + return ; + } +}