From 25f56026fccb5913ac12bd9e261269fb1018f926 Mon Sep 17 00:00:00 2001 From: PxlLoewe <72106766+PxlLoewe@users.noreply.github.com> Date: Sun, 27 Jul 2025 15:02:14 -0700 Subject: [PATCH] Fixed type bugs in Reports form --- apps/hub/app/(app)/admin/event/action.ts | 5 +---- .../app/(app)/admin/keyword/_components/Form.tsx | 15 ++++++--------- .../(app)/admin/report/_components/NewReport.tsx | 14 +++++++------- 3 files changed, 14 insertions(+), 20 deletions(-) diff --git a/apps/hub/app/(app)/admin/event/action.ts b/apps/hub/app/(app)/admin/event/action.ts index f972f7b8..0a3c6a3e 100644 --- a/apps/hub/app/(app)/admin/event/action.ts +++ b/apps/hub/app/(app)/admin/event/action.ts @@ -17,10 +17,7 @@ export const deleteEvent = async (id: Event["id"]) => { }; export const upsertAppointment = async ( - eventAppointment: Prisma.XOR< - Prisma.EventAppointmentCreateInput, - Prisma.EventAppointmentUncheckedCreateInput - >, + eventAppointment: Prisma.EventAppointmentUncheckedCreateInput, ) => { const newEventAppointment = eventAppointment.id ? await prisma.eventAppointment.update({ diff --git a/apps/hub/app/(app)/admin/keyword/_components/Form.tsx b/apps/hub/app/(app)/admin/keyword/_components/Form.tsx index d76b810e..8adb16ab 100644 --- a/apps/hub/app/(app)/admin/keyword/_components/Form.tsx +++ b/apps/hub/app/(app)/admin/keyword/_components/Form.tsx @@ -5,7 +5,6 @@ import { useForm } from "react-hook-form"; import { KEYWORD_CATEGORY, Keyword } from "@repo/db"; import { FileText } from "lucide-react"; import { Input } from "../../../../_components/ui/Input"; -import { useState } from "react"; import { deleteKeyword, upsertKeyword } from "../action"; import { Button } from "../../../../_components/ui/Button"; import { redirect } from "next/navigation"; @@ -17,7 +16,6 @@ export const KeywordForm = ({ keyword }: { keyword?: Keyword }) => { resolver: zodResolver(KeywordOptionalDefaultsSchema), defaultValues: keyword, }); - const [deleteLoading, setDeleteLoading] = useState(false); return ( <>
{ })} className="grid grid-cols-6 gap-3" > -
+

- Allgemeines + Allgemeines

-