Skip to content

Commit

Permalink
Fix events page build error due to cookies (in getClient) being calle…
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavberi committed Nov 14, 2024
1 parent cc173b8 commit 748842e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/app/events/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ export const metadata = {
title: "Events | Clubs Council @ IIIT-H",
};

const client = getClient();

async function query(querystring) {
"use server";
const { data = {}, error } = await client.query(GET_ALL_EVENTS, {
const { data = {}, error } = await getClient().query(GET_ALL_EVENTS, {
clubid: querystring["targetClub"],
name: querystring["targetName"],
public: true,
Expand All @@ -41,7 +39,7 @@ export default async function Events({ searchParams }) {
(state) => searchParams?.[state] !== "false",
);

const { data: { allClubs } = {} } = await client.query(GET_ALL_CLUBS);
const { data: { allClubs } = {} } = await getClient().query(GET_ALL_CLUBS);

return (
<Box>
Expand Down

0 comments on commit 748842e

Please sign in to comment.