From 1cabb03efe5baa80585bb3e52447495407647dfb Mon Sep 17 00:00:00 2001 From: Connor Harris Date: Tue, 1 Oct 2024 16:57:43 -0500 Subject: [PATCH] added session stuff --- src/app/clubSearch/page.tsx | 4 +++- src/components/ClubSearchComponent.tsx | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/clubSearch/page.tsx b/src/app/clubSearch/page.tsx index 080ec094..3f79726e 100644 --- a/src/app/clubSearch/page.tsx +++ b/src/app/clubSearch/page.tsx @@ -1,5 +1,6 @@ import Header from '@src/components/BaseHeader'; import { ClubSearchComponent } from '@src/components/ClubSearchComponent'; +import { getServerAuthSession } from '@src/server/auth'; type Params = { searchParams: { [key: string]: string | undefined }; @@ -8,12 +9,13 @@ type Params = { const clubSearch = async (props: Params) => { const { searchParams } = props; const userSearch = searchParams['search'] || ''; + const session = await getServerAuthSession(); return (
- +
); diff --git a/src/components/ClubSearchComponent.tsx b/src/components/ClubSearchComponent.tsx index 0e0b113a..ad6084a0 100644 --- a/src/components/ClubSearchComponent.tsx +++ b/src/components/ClubSearchComponent.tsx @@ -1,7 +1,7 @@ 'use client'; import { api } from '@src/trpc/react'; import DirectoryOrgs from './DirectoryOrgs'; -import type { SelectClub as Club } from '@src/server/db/models'; // Assuming you use this type +import type { SelectClub as Club } from '@src/server/db/models'; import { type Session } from 'next-auth'; interface ClubSearchComponentProps {