Merge pull request #1833 from bluewave-labs/fix/breadcrumbs

fix: breadcrumbs, resolves #1829
This commit is contained in:
Alexander Holliday
2025-02-26 14:01:56 -08:00
committed by GitHub
2 changed files with 8 additions and 4 deletions

View File

@@ -42,8 +42,9 @@ const CreateDistributedUptime = () => {
const { monitorId } = useParams();
const isCreate = typeof monitorId === "undefined";
const BREADCRUMBS = [
let BREADCRUMBS = [
{ name: `distributed uptime`, path: "/distributed-uptime" },
...(isCreate ? [] : [{ name: "details", path: `/distributed-uptime/${monitorId}` }]),
{ name: isCreate ? "create" : "configure", path: `` },
];
@@ -182,7 +183,7 @@ const CreateDistributedUptime = () => {
component="span"
fontSize="inherit"
>
Create your{" "}
{isCreate ? "Create your" : "Edit your"}{" "}
</Typography>
<Typography
component="span"

View File

@@ -40,7 +40,10 @@ const CreateStatus = () => {
const BREADCRUMBS = [
{ name: "distributed uptime", path: "/distributed-uptime" },
{ name: "details", path: `/distributed-uptime/${monitorId}` },
{
name: "details",
path: `/distributed-uptime/${isCreate ? monitorId : statusPage?.monitors[0]}`,
},
{ name: isCreate ? "create status page" : "edit status page", path: `` },
];
// Local state
@@ -173,7 +176,7 @@ const CreateStatus = () => {
component="span"
fontSize="inherit"
>
Create your{" "}
{isCreate ? "Create your" : "Edit your"}{" "}
</Typography>
<Typography
component="span"