From 03e07037ea43d54fef0e421589c526e883ab97a8 Mon Sep 17 00:00:00 2001 From: mantikoros <95266179+mantikoros@users.noreply.github.com> Date: Sun, 28 Aug 2022 00:23:25 -0500 Subject: [PATCH] ban users from posting (#810) --- common/user.ts | 1 + web/components/answers/create-answer-panel.tsx | 2 ++ web/components/create-question-button.tsx | 3 +++ web/components/feed/feed-comments.tsx | 2 ++ web/components/groups/create-group-button.tsx | 2 ++ web/pages/create.tsx | 12 ++++++++++++ 6 files changed, 22 insertions(+) diff --git a/common/user.ts b/common/user.ts index 48a3d59c..e3c9d181 100644 --- a/common/user.ts +++ b/common/user.ts @@ -44,6 +44,7 @@ export type User = { currentBettingStreak?: number hasSeenContractFollowModal?: boolean freeMarketsCreated?: number + isBannedFromPosting?: boolean } export type PrivateUser = { diff --git a/web/components/answers/create-answer-panel.tsx b/web/components/answers/create-answer-panel.tsx index ce266778..6290cf44 100644 --- a/web/components/answers/create-answer-panel.tsx +++ b/web/components/answers/create-answer-panel.tsx @@ -115,6 +115,8 @@ export function CreateAnswerPanel(props: { contract: FreeResponseContract }) { const currentReturn = betAmount ? (currentPayout - betAmount) / betAmount : 0 const currentReturnPercent = (currentReturn * 100).toFixed() + '%' + if (user?.isBannedFromPosting) return <>> + return (
Sorry, you are currently banned from creating a market.
+