diff --git a/apps/hub/app/(app)/admin/config/action.tsx b/apps/hub/app/(app)/admin/config/action.tsx index 6a1600f2..38be7209 100644 --- a/apps/hub/app/(app)/admin/config/action.tsx +++ b/apps/hub/app/(app)/admin/config/action.tsx @@ -6,8 +6,8 @@ export const addMessage = async (notam: Prisma.ConfigCreateInput) => { await prisma.config.create({ data: notam, }); - } catch (error) { - throw new Error("Failed to add message"); + } catch (e) { + throw new Error(`Failed to add message: ${e instanceof Error ? e.message : "Unknown error"}`); } }; @@ -16,7 +16,7 @@ export const disableMessage = async () => { await prisma.config.create({ data: {}, }); - } catch (error) { - throw new Error("Failed to disable message"); + } catch (e) { + throw new Error(`Failed to add message: ${e instanceof Error ? e.message : "Unknown error"}`); } }; diff --git a/apps/hub/app/(app)/admin/config/page.tsx b/apps/hub/app/(app)/admin/config/page.tsx index e19171e9..b514fb08 100644 --- a/apps/hub/app/(app)/admin/config/page.tsx +++ b/apps/hub/app/(app)/admin/config/page.tsx @@ -1,6 +1,6 @@ "use client"; -import { Check, MessageSquareWarning, Settings } from "lucide-react"; +import { Check, Settings } from "lucide-react"; import { MessageForm } from "./_components/MessageForm"; import { PaginatedTable, PaginatedTableRef } from "_components/PaginatedTable"; import { ColumnDef } from "@tanstack/react-table"; diff --git a/apps/hub/app/(app)/admin/event/_components/AppointmentModal.tsx b/apps/hub/app/(app)/admin/event/_components/AppointmentModal.tsx index 2805750c..4d6ec3d8 100644 --- a/apps/hub/app/(app)/admin/event/_components/AppointmentModal.tsx +++ b/apps/hub/app/(app)/admin/event/_components/AppointmentModal.tsx @@ -1,5 +1,5 @@ import { Event, Participant } from "@repo/db"; -import { EventAppointmentOptionalDefaults } from "@repo/db/zod"; +import { EventAppointmentOptionalDefaults, InputJsonValueType } from "@repo/db/zod"; import { ColumnDef } from "@tanstack/react-table"; import { useSession } from "next-auth/react"; import { RefObject, useRef } from "react"; @@ -45,7 +45,7 @@ export const AppointmentModal = ({ ✕ -