add placeholder pages for people

This commit is contained in:
Nayan Sawyer
2026-03-15 09:47:13 -04:00
parent 7d6b6d3cd4
commit 7818db770f
3 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
export default function PersonDesktop() {
return (
<div>
<h1>Person</h1>
</div>
);
}

View File

@@ -0,0 +1,7 @@
export default function PersonMobile() {
return (
<div>
<h1>Person</h1>
</div>
);
}

31
src/app/person/page.tsx Normal file
View File

@@ -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 <div>Loading...</div>;
}
if (error) {
return <div>Error: {error.message}</div>;
}
// Get window width for responsive design
const width = typeof window !== "undefined" ? window.innerWidth : 0;
if (width === 0) {
return <div>Loading...</div>;
}
// Render the mobile component if the window width is less than 768
if (!isPending && session && width < 768) {
return <PersonMobile />;
}
// Render the desktop component if the window width is greater than or equal to 768
if (!isPending && session && width >= 768) {
return <PersonDesktop />;
}
}