Skip to content

Commit

Permalink
fix: small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
userMeh committed Jul 23, 2024
1 parent 6c627a6 commit 00b9891
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 26 deletions.
6 changes: 1 addition & 5 deletions apps/admin/app/ui/dashboard/addresses/AddAddress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,7 @@ function addAddress({ addresses, setAddresses }: Props): JSX.Element {
</div>
</div>
<div className="flex gap-4 mt-4">
<Button
type="submit"
className="w-full"
disabled={form.formState.isSubmitting || !form.formState.isValid}
>
<Button type="submit" className="w-full">
Créer
</Button>
<Button variant="secondary" type="button" onClick={() => setOpen(false)} className="w-full">
Expand Down
4 changes: 1 addition & 3 deletions apps/admin/app/ui/dashboard/addresses/EditForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,7 @@ function EditForm(props: EditFormProps): JSX.Element {
</div>
</div>
<div className="flex gap-4 mt-4">
<Button type="submit" disabled={form.formState.isSubmitting || !form.formState.isValid}>
Modifier
</Button>
<Button type="submit">Modifier</Button>
<Button
variant="secondary"
onClick={(e) => {
Expand Down
10 changes: 3 additions & 7 deletions apps/admin/app/ui/dashboard/tournaments/AddTournaments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ function AddTournaments({ tournaments, setTournaments, addresses, sports }: Prop
team_capacity: z.coerce
.number({ message: 'Le champ doit contenir un nombre' })
.min(1, { message: "La capacité de l'équipe ne peut être inférieur à 1" }),
id_address: z.number().min(1).optional(),
id_sport: z.number().min(1).optional(),
id_address: z.coerce.number().min(1).optional(),
id_sport: z.coerce.number().min(1).optional(),
rules: z.string().optional(),
prize: z.string().optional(),
image: z
Expand Down Expand Up @@ -312,11 +312,7 @@ function AddTournaments({ tournaments, setTournaments, addresses, sports }: Prop
</div>
</div>
<div className="flex gap-4 mt-4">
<Button
type="submit"
className="w-full"
disabled={form.formState.isSubmitting || !form.formState.isValid}
>
<Button type="submit" className="w-full">
Créer
</Button>
<Button variant="secondary" type="button" onClick={() => setOpen(false)} className="w-full">
Expand Down
1 change: 0 additions & 1 deletion apps/admin/app/ui/dashboard/tournaments/EditForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ function EditForm(props: EditFormProps): JSX.Element {
e.preventDefault();
props.closeDialog();
}}
disabled={form.formState.isSubmitting || !form.formState.isValid}
>
Annuler
</Button>
Expand Down
6 changes: 1 addition & 5 deletions apps/admin/app/ui/dashboard/votes/AddPoll.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,7 @@ function AddPoll({ polls, setPolls, assemblies }: Props) {
</Button>
</div>
<div className="flex gap-4 mt-4">
<Button
type="submit"
className="w-full"
disabled={form.formState.isSubmitting || !form.formState.isValid}
>
<Button type="submit" className="w-full">
Créer
</Button>
<Button variant="secondary" type="button" onClick={() => setOpen(false)} className="w-full">
Expand Down
6 changes: 1 addition & 5 deletions apps/admin/app/ui/dashboard/votes/EditPoll.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,7 @@ function EditPoll({ poll, setter, assemblies }: Props) {
/>
</div>
<div className="flex gap-4 mt-4">
<Button
type="submit"
className="w-full"
disabled={form.formState.isSubmitting || !form.formState.isValid}
>
<Button type="submit" className="w-full">
Modifier
</Button>
<Button variant="secondary" type="button" className="w-full">
Expand Down

0 comments on commit 00b9891

Please sign in to comment.