Skip to content

Commit

Permalink
Fix potential null error for events.checkedIn hook
Browse files Browse the repository at this point in the history
- Typo in api/private/addMember.ts
  • Loading branch information
Xevion committed Feb 2, 2023
1 parent e9d5648 commit ac63108
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pages/api/private/addMember.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { z } from "zod";
import { env } from "@/env/server.mjs";

// This is pretty much a "Made for purpose" version of this for the migration since python does not support prisma.
// TODO: In the future it should be made more secure / predicatable / optimized.
// TODO: In the future it should be made more secure / predictable / optimized.
// Also should probably make some docs for this at some point on Notion

const addMember = async (req: NextApiRequest, res: NextApiResponse) => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/events/[id]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const EventView: NextPage<{ json: string }> = ({ json }) => {
const { data: existingCheckin } = trpc.events.checkedIn.useQuery(
{ eventId: event.id },
{
enabled: isMember,
enabled: isMember ?? false,
}
);

Expand Down

0 comments on commit ac63108

Please sign in to comment.