Skip to content

Commit

Permalink
add deployment name to browser tab
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks committed Oct 30, 2024
1 parent dfaa02d commit 47332b3
Showing 1 changed file with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { Metadata } from "next";
import Link from "next/link";
import { notFound } from "next/navigation";
import { IconAlertTriangle } from "@tabler/icons-react";
Expand All @@ -14,13 +15,27 @@ import { SystemBreadcrumbNavbar } from "../../../SystemsBreadcrumb";
import { TopNav } from "../../../TopNav";
import { DeploymentNavBar } from "./DeploymentNavBar";

type PageProps = {
params: { workspaceSlug: string; systemSlug: string; deploymentSlug: string };
};

export async function generateMetadata({
params,
}: PageProps): Promise<Metadata> {
const deployment = await api.deployment.bySlug(params);
if (deployment == null) return notFound();

return {
title: `${deployment.name} | Deployments`,
};
}

export default async function DeploymentLayout({
children,
params,
}: {
children: React.ReactNode;
params: any;
}) {
} & PageProps) {
const workspace = await api.workspace.bySlug(params.workspaceSlug);
if (workspace == null) return notFound();
const deployment = await api.deployment.bySlug(params);
Expand Down

0 comments on commit 47332b3

Please sign in to comment.