Import source: src/app/(panel)/[...slug]/page

Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality.
This commit is contained in:
arsam
2026-09-18 23:10:25 +03:30
parent 42c529bbf5
commit adccdeddd3
+17
View File
@@ -0,0 +1,17 @@
import { notFound } from "next/navigation";
import { FeaturePage } from "@/components/features/feature-page";
import { routeItems } from "@/lib/routes";
export default async function PanelRoute({ params }: { params: Promise<{ slug?: string[] }> }) {
const { slug = [] } = await params;
const path = `/${slug.join("/")}`;
const exact = routeItems.some((route) => route.path === path);
const supportedDynamic =
/^\/websites\/[^/]+(\/deployments|\/logs|\/settings)?$/.test(path) ||
/^\/domains\/[^/]+(\/dns|\/ssl)?$/.test(path) ||
/^\/servers\/[^/]+(\/services|\/processes|\/updates|\/network)?$/.test(path) ||
/^\/backups\/[^/]+$/.test(path) ||
/^\/automation\/[^/]+$/.test(path);
if (!exact && !supportedDynamic) notFound();
return <FeaturePage path={path} />;
}