From ce3373ce40bdb6cc96ff92086c4c01419452d24a Mon Sep 17 00:00:00 2001 From: minhd-vu Date: Mon, 26 Feb 2024 00:20:06 -0500 Subject: [PATCH] add winner to ui --- components/Party.tsx | 1 + lib/user.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/components/Party.tsx b/components/Party.tsx index 5dbadab..a525852 100644 --- a/components/Party.tsx +++ b/components/Party.tsx @@ -104,6 +104,7 @@ export default function Party() { return ( + {party.winner &&

Last Round's Winner: {party.winner.name}

}

Mode: {_.startCase(_.toLower(party.mode))}

{!isAdmin && (

diff --git a/lib/user.ts b/lib/user.ts index a231a21..bfefbcf 100644 --- a/lib/user.ts +++ b/lib/user.ts @@ -12,6 +12,7 @@ export async function getUser(email: string) { party: { include: { players: true, + winner: true, }, }, },