diff --git a/space/app/[workspace_slug]/[project_id]/layout.tsx b/space/app/[workspace_slug]/[project_id]/layout.tsx index ad713db18..aabff72ba 100644 --- a/space/app/[workspace_slug]/[project_id]/layout.tsx +++ b/space/app/[workspace_slug]/[project_id]/layout.tsx @@ -2,25 +2,24 @@ import Image from "next/image"; import { notFound } from "next/navigation"; // components import IssueNavbar from "@/components/issues/navbar"; -// services -import ProjectService from "@/services/project.service"; // assets import planeLogo from "public/plane-logo.svg"; -const projectService = new ProjectService(); - -export default async function ProjectLayout({ children, params }: { children: React.ReactNode; params: any }) { +export default async function ProjectLayout({ + children, + params, +}: { + children: React.ReactNode; + params: { workspace_slug: string; project_id: string }; +}) { const { workspace_slug, project_id } = params; - const projectSettings = await projectService.getProjectSettings(workspace_slug, project_id).catch(() => null); - if (!projectSettings) { - notFound(); - } + if (!workspace_slug || !project_id) notFound(); return (