From d01c2247b50c30132efab1eebf715dd60a277b2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yusuf=20=C4=B0pek?= Date: Sat, 7 Feb 2026 17:21:44 +0300 Subject: [PATCH] refactor: Simplify project type mapping in WorkspacePage --- app/(dashboard)/workspaces/[workspaceId]/page.tsx | 5 +---- package.json | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/(dashboard)/workspaces/[workspaceId]/page.tsx b/app/(dashboard)/workspaces/[workspaceId]/page.tsx index 6671840..02acb8b 100644 --- a/app/(dashboard)/workspaces/[workspaceId]/page.tsx +++ b/app/(dashboard)/workspaces/[workspaceId]/page.tsx @@ -16,7 +16,6 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/com import { Badge } from '@/components/ui/badge'; import { auth } from '@/lib/auth'; import { db } from '@/lib/db'; -import type { Prisma } from '@prisma/client'; function VisibilityIcon({ visibility }: { visibility: string }) { switch (visibility) { @@ -145,9 +144,7 @@ export default async function WorkspacePage({ params }: WorkspacePageProps) { {/* Projects Grid */} {workspace.projects.length > 0 ? (
- {workspace.projects.map((project: Prisma.ProjectGetPayload<{ - include: { _count: { select: { videos: true; members: true } } }; - }>) => ( + {workspace.projects.map((project: (typeof workspace.projects)[number]) => ( diff --git a/package.json b/package.json index 5c89cea..24f6680 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "private": true, "scripts": { "dev": "next dev", + "prebuild": "bun run typecheck", "build": "next build", "start": "next start", "lint": "eslint",