From 6efc29c6691700ec25f5889a25ee57dcee9e8799 Mon Sep 17 00:00:00 2001 From: Brian Nelson Date: Sun, 29 Jun 2025 20:02:22 -0400 Subject: [PATCH] mobile styles --- app/(auth)/dashboard/page.tsx | 73 +++++++++++++++------------------ app/(auth)/layout.tsx | 7 ++-- components/DashboardNavbar.tsx | 5 +-- components/EventInfoDisplay.tsx | 9 ++-- 4 files changed, 42 insertions(+), 52 deletions(-) diff --git a/app/(auth)/dashboard/page.tsx b/app/(auth)/dashboard/page.tsx index 428cd63..ce357df 100644 --- a/app/(auth)/dashboard/page.tsx +++ b/app/(auth)/dashboard/page.tsx @@ -1,60 +1,53 @@ import AddFirstGuestBookEntryClient from '@/components/AddFirstGuestBookEntryClient' -import AddGuestBookEntryModal from '@/components/AddGuestBookEntryModal' import CreateEventClient from '@/components/CreateEventClient' -import DashboardNavbar from '@/components/DashboardNavbar' import EventInfoQuickView from '@/components/EventInfoQuickView' import GuestBookQuickView from '@/components/GuestBookQuickView' -import { prisma } from '@/lib/prisma' import { queries } from '@/lib/queries' -import { getServerSession } from 'next-auth' import Link from 'next/link' import React from 'react' export default async function DashboardPage() { const events = await queries.fetchEvents(); const guestBookEntries = await queries.fetchGuestBookEntries(5); - const session = await getServerSession(); - - const user = await prisma.user.findUnique({ - where: { email: session?.user.email } - }) return ( -
-
-
-
-

Your Events

- -
- {!events.length && <>You don't have any events yet. Create your first event.} -
- {events.map((item) => ( - - ))} -
+
+
+
+
+

Your Events

+
- - View all - -
-
-
-

Guest Book

- - View All - -
-
- {!guestBookEntries.length && } - {guestBookEntries.map(entry => ( - + {!events.length && <>You don't have any events yet. Create your first event.} +
+ {events.map((item) => ( + ))}
+
+ + View all + +
+
+
+
+

Guest Book

+ + View All + +
+
+ {!guestBookEntries.length && } + {guestBookEntries.map(entry => ( + + ))} +
+
) } diff --git a/app/(auth)/layout.tsx b/app/(auth)/layout.tsx index ae9a5c4..69083c8 100644 --- a/app/(auth)/layout.tsx +++ b/app/(auth)/layout.tsx @@ -1,7 +1,6 @@ 'use client' import { SessionProvider } from 'next-auth/react' -import { redirect } from 'next/navigation' import { ReactNode } from 'react' import DashboardNavbar from '@/components/DashboardNavbar' @@ -10,10 +9,10 @@ export default function AuthLayout({ children }: { children: ReactNode }) { return ( <> -
-
+
+
-
+
{children}
diff --git a/components/DashboardNavbar.tsx b/components/DashboardNavbar.tsx index 7878ea3..b6e9895 100644 --- a/components/DashboardNavbar.tsx +++ b/components/DashboardNavbar.tsx @@ -5,11 +5,10 @@ import React from 'react' export default function DashboardNavbar() { const session = useSession() - console.log(session) return ( -
+

Hello, {session.data?.user.username}

-
+
Overview Events Guest Book diff --git a/components/EventInfoDisplay.tsx b/components/EventInfoDisplay.tsx index 517f4f4..695755c 100644 --- a/components/EventInfoDisplay.tsx +++ b/components/EventInfoDisplay.tsx @@ -48,7 +48,6 @@ export default function EventInfoDisplay({ event }: Props) { const [todos, setTodos] = useState(event.todos) const eventGuests = event.eventGuests - console.log(eventGuests) const [saving, setSaving] = useState(false) const [error, setError] = useState('') @@ -111,8 +110,8 @@ export default function EventInfoDisplay({ event }: Props) { } return ( -
-
+
+

{event.name}

-
+

Guest List

-
+