From 724c4fec5f877c312cc5df450dd753121707793c Mon Sep 17 00:00:00 2001 From: Max Meinhold Date: Sat, 24 Apr 2021 11:25:28 -0400 Subject: [PATCH] =?UTF-8?q?Add=20=F0=9F=8E=82=20conditional=20option?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/Pages/Vote/index.tsx | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/client/src/components/Pages/Vote/index.tsx b/client/src/components/Pages/Vote/index.tsx index f5bbe48..ef7a757 100644 --- a/client/src/components/Pages/Vote/index.tsx +++ b/client/src/components/Pages/Vote/index.tsx @@ -25,6 +25,29 @@ class AuthError extends Error { public readonly name: string = "AuthError"; } +const EatAWholeCakeButton: React.FunctionComponent<{ poll: Poll }> = ({ + poll, +}: { + poll: Poll; +}) => { + if (poll.type === "Conditional") { + return ( +
  • + +
  • + ); + } + return <>; +}; + export const Vote: React.FunctionComponent = () => { const { voteId } = useParams(); const [poll, setPoll] = useState(undefined); @@ -157,6 +180,7 @@ export const Vote: React.FunctionComponent = () => { ); })} +