Skip to content

Commit

Permalink
added session stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
CHarris0812 committed Oct 1, 2024
1 parent 31df6a1 commit 1cabb03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/app/clubSearch/page.tsx
Original file line number Diff line number Diff line change
@@ -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 };
Expand All @@ -8,12 +9,13 @@ type Params = {
const clubSearch = async (props: Params) => {
const { searchParams } = props;
const userSearch = searchParams['search'] || '';
const session = await getServerAuthSession();

return (
<main className="md:pl-72">
<div>
<Header />
<ClubSearchComponent userSearch={userSearch} />
<ClubSearchComponent userSearch={userSearch} session={session} />
</div>
</main>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/ClubSearchComponent.tsx
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down

0 comments on commit 1cabb03

Please sign in to comment.