2024-08-26 21:31:42 +03:00
|
|
|
import { cn } from "@/util/utils";
|
2025-07-07 22:30:33 -04:00
|
|
|
import { Outlet, useMatch, useSearchParams } from "react-router-dom";
|
2024-07-11 03:08:52 -07:00
|
|
|
|
|
|
|
|
function WorkflowsPageLayout() {
|
2025-07-07 22:30:33 -04:00
|
|
|
const [searchParams] = useSearchParams();
|
|
|
|
|
const embed = searchParams.get("embed");
|
|
|
|
|
const match =
|
|
|
|
|
useMatch("/workflows/:workflowPermanentId/edit") ||
|
|
|
|
|
location.pathname.includes("debug") ||
|
|
|
|
|
embed === "true";
|
2024-07-11 03:08:52 -07:00
|
|
|
return (
|
2024-08-26 21:31:42 +03:00
|
|
|
<main
|
|
|
|
|
className={cn({
|
2024-10-31 08:49:15 -07:00
|
|
|
"container mx-auto": !match,
|
2024-08-26 21:31:42 +03:00
|
|
|
})}
|
|
|
|
|
>
|
2024-07-11 03:08:52 -07:00
|
|
|
<Outlet />
|
|
|
|
|
</main>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export { WorkflowsPageLayout };
|