From c8d91b684fc9fa63127ad0330f4790d63ec3129a Mon Sep 17 00:00:00 2001 From: PxlLoewe <72106766+PxlLoewe@users.noreply.github.com> Date: Wed, 26 Mar 2025 14:04:15 -0700 Subject: [PATCH] Error boundary --- .../hub/app/(app)/admin/keyword/[id]/page.tsx | 20 +- .../(app)/admin/keyword/_components/Form.tsx | 211 ++++-------------- apps/hub/app/(app)/admin/keyword/action.ts | 20 +- apps/hub/app/(app)/admin/keyword/layout.tsx | 2 +- apps/hub/app/(app)/admin/keyword/new/page.tsx | 4 +- apps/hub/app/(app)/admin/keyword/page.tsx | 84 ++++--- .../(app)/admin/station/_components/Form.tsx | 26 ++- apps/hub/app/(auth)/layout.tsx | 31 ++- .../app/(auth)/login/_components/Login.tsx | 39 ++-- .../(auth)/oauth/_components/Authorize.tsx | 22 +- .../_components/PasswortReset.tsx | 97 ++++++++ apps/hub/app/(auth)/passwort-reset/action.ts | 42 ++++ apps/hub/app/(auth)/passwort-reset/page.tsx | 9 + .../(auth)/register/_components/Register.tsx | 34 +-- apps/hub/app/_components/Error.tsx | 33 ++- apps/hub/app/_components/Nav.tsx | 3 + apps/hub/package.json | 1 + grafana/grafana.db | Bin 1122304 -> 1122304 bytes package-lock.json | 13 ++ .../database/prisma/schema/keyword.prisma | 20 +- packages/database/prisma/schema/user.prisma | 1 + 21 files changed, 414 insertions(+), 298 deletions(-) create mode 100644 apps/hub/app/(auth)/passwort-reset/_components/PasswortReset.tsx create mode 100644 apps/hub/app/(auth)/passwort-reset/action.ts create mode 100644 apps/hub/app/(auth)/passwort-reset/page.tsx diff --git a/apps/hub/app/(app)/admin/keyword/[id]/page.tsx b/apps/hub/app/(app)/admin/keyword/[id]/page.tsx index 399adf90..7cfeaf45 100644 --- a/apps/hub/app/(app)/admin/keyword/[id]/page.tsx +++ b/apps/hub/app/(app)/admin/keyword/[id]/page.tsx @@ -1,13 +1,13 @@ -import { prisma } from '@repo/db'; -import { StationForm } from '../_components/Form'; +import { prisma } from "@repo/db"; +import { KeywordForm } from "../_components/Form"; export default async ({ params }: { params: Promise<{ id: string }> }) => { - const { id } = await params; - const station = await prisma.station.findUnique({ - where: { - id: parseInt(id), - }, - }); - if (!station) return