sendou.ink/app/features/tournament-organization/components/BanUserModal.tsx
2026-01-18 18:21:19 +02:00

32 lines
822 B
TypeScript

import { useTranslation } from "react-i18next";
import { SendouButton } from "~/components/elements/Button";
import { SendouDialog } from "~/components/elements/Dialog";
import { SendouForm } from "~/form/SendouForm";
import { banUserActionSchema } from "../tournament-organization-schemas";
export function BanUserModal() {
const { t } = useTranslation(["org"]);
return (
<SendouDialog
heading={t("org:banned.banModal.title")}
trigger={
<SendouButton variant="outlined" size="small">
{t("org:banned.ban")}
</SendouButton>
}
showCloseButton
>
<SendouForm schema={banUserActionSchema}>
{({ FormField }) => (
<>
<FormField name="userId" />
<FormField name="privateNote" />
<FormField name="expiresAt" />
</>
)}
</SendouForm>
</SendouDialog>
);
}