fix(web): workflow org visibility issues

This commit is contained in:
BennyKok
2024-01-01 23:51:12 +08:00
parent 8190740abf
commit 40d9060fda
4 changed files with 42 additions and 3 deletions
@@ -18,6 +18,7 @@ import {
import { getRelativeTime } from "@/lib/getRelativeTime";
import { getMachines } from "@/server/curdMachine";
import { findFirstTableWithVersion } from "@/server/findFirstTableWithVersion";
import { redirect } from "next/navigation";
export default async function Page({
params,
@@ -15,8 +15,8 @@ export default async function Layout({
{workflow}
{deployment}
</div>
{runs}
{children}
</div>
);
}
@@ -0,0 +1,13 @@
import { findWorkflowById } from "@/server/findFirstTableWithVersion";
import { redirect } from "next/navigation";
export default async function Page({
params,
}: {
params: { workflow_id: string };
}) {
const workflow = await findWorkflowById(params.workflow_id);
if (!workflow) redirect("/workflows");
return <></>;
}