From d7b1fc700fac698605840d76fa19360c92160ec2 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sat, 2 Dec 2023 13:26:47 +0200 Subject: [PATCH] Fix not being able to cancel SendouQ matches as admin --- app/components/FormWithConfirm.tsx | 5 ++++- app/features/sendouq/routes/q.match.$id.tsx | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/components/FormWithConfirm.tsx b/app/components/FormWithConfirm.tsx index e973abf4d..eaefc3e57 100644 --- a/app/components/FormWithConfirm.tsx +++ b/app/components/FormWithConfirm.tsx @@ -17,7 +17,10 @@ export function FormWithConfirm({ submitButtonVariant = "destructive", fetcher: _fetcher, }: { - fields?: [name: string, value: string | number][]; + fields?: ( + | [name: string, value: string | number] + | readonly [name: string, value: string | number] + )[]; children: React.ReactNode; dialogHeading: string; deleteButtonText?: string; diff --git a/app/features/sendouq/routes/q.match.$id.tsx b/app/features/sendouq/routes/q.match.$id.tsx index e32c0263d..5d5a0b2bc 100644 --- a/app/features/sendouq/routes/q.match.$id.tsx +++ b/app/features/sendouq/routes/q.match.$id.tsx @@ -1096,6 +1096,7 @@ function BottomSection({ fields={[ ["_action", "REPORT_SCORE"], ["winners", "[]"], + ...(!data.groupMemberOf ? [["adminReport", "on"] as const] : []), ]} deleteButtonText={t("common:actions.cancel")} cancelButtonText={t("common:actions.nevermind")}