disable isTournament

This commit is contained in:
Kalle (Sendou) 2021-03-26 21:06:24 +02:00
parent f81f56a3a4
commit b6eefa5a47
2 changed files with 16 additions and 7 deletions

View File

@ -6,7 +6,6 @@ import {
FormLabel,
} from "@chakra-ui/form-control";
import { Input } from "@chakra-ui/input";
import { Stack } from "@chakra-ui/layout";
import {
Modal,
ModalBody,
@ -16,7 +15,6 @@ import {
ModalHeader,
ModalOverlay,
} from "@chakra-ui/modal";
import { Radio, RadioGroup } from "@chakra-ui/radio";
import { Select } from "@chakra-ui/select";
import { zodResolver } from "@hookform/resolvers/zod";
import { t, Trans } from "@lingui/macro";
@ -86,10 +84,10 @@ export function EventModal({
if (window.confirm(t`Delete the event?`)) await onDelete();
}}
>
<Trans>Delete build</Trans>
<Trans>Delete event</Trans>
</Button>
)}
<FormLabel htmlFor="isTournament">
{/* <FormLabel htmlFor="isTournament">
<Trans>Type</Trans>
</FormLabel>
@ -102,9 +100,9 @@ export function EventModal({
<Trans>Other</Trans>
</Radio>
</Stack>
</RadioGroup>
</RadioGroup> */}
<FormLabel htmlFor="name" mt={4}>
<FormLabel htmlFor="name">
<Trans>Name</Trans>
</FormLabel>

View File

@ -16,7 +16,18 @@ export const eventSchema = z.object({
return true;
}),
eventUrl: z.string().url(),
discordInviteUrl: z.string().url().optional().nullable(),
discordInviteUrl: z
.string()
.url()
.refine(
(val) =>
val.startsWith("https://discord.io/") ||
val.startsWith("https://discord.gg/"),
{
message:
"Has to start with 'https://discord.gg/' or 'https://discord.io/'",
}
),
tags: z.array(
z.enum([
"SZ",