From: Daniel Karbach Date: Tue, 1 Nov 2022 18:06:15 +0000 (+0100) Subject: hide comment button for open rounds without result X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=90c7102cea4af9b07eb5232fd720f4b2714f44ed;p=alttp.git hide comment button for open rounds without result --- diff --git a/resources/js/components/results/ReportButton.js b/resources/js/components/results/ReportButton.js index ec8f8fd..9db944e 100644 --- a/resources/js/components/results/ReportButton.js +++ b/resources/js/components/results/ReportButton.js @@ -28,6 +28,10 @@ const getButtonLabel = (user, round) => { const ReportButton = ({ round, user }) => { const [showDialog, setShowDialog] = useState(false); + if (round.locked && !findResult(user, round)) { + return null; + } + return <>