fix breadcrumbs

This commit is contained in:
Alex Holliday committed 2025-02-26 14:00:51 -08:00
1 parent a1b8d0952a
commit 1166da1ab0
2 files changed
+8 -4

No files matched your search

+3 -2
View File
@@ -42,8 +42,9 @@ const CreateDistributedUptime = () => {
const { monitorId } = useParams(); const { monitorId } = useParams();
const isCreate = typeof monitorId === "undefined"; const isCreate = typeof monitorId === "undefined";
const BREADCRUMBS = [ let BREADCRUMBS = [
{ name: `distributed uptime`, path: "/distributed-uptime" }, { name: `distributed uptime`, path: "/distributed-uptime" },
...(isCreate ? [] : [{ name: "details", path: `/distributed-uptime/${monitorId}` }]),
{ name: isCreate ? "create" : "configure", path: `` }, { name: isCreate ? "create" : "configure", path: `` },
]; ];
@@ -182,7 +183,7 @@ const CreateDistributedUptime = () => {
component="span" component="span"
fontSize="inherit" fontSize="inherit"
> >
Create your{" "} {isCreate ? "Create your" : "Edit your"}{" "}
</Typography> </Typography>
<Typography <Typography
component="span" component="span"
@@ -40,7 +40,10 @@ const CreateStatus = () => {
const BREADCRUMBS = [ const BREADCRUMBS = [
{ name: "distributed uptime", path: "/distributed-uptime" }, { 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: `` }, { name: isCreate ? "create status page" : "edit status page", path: `` },
]; ];
// Local state // Local state
@@ -173,7 +176,7 @@ const CreateStatus = () => {
component="span" component="span"
fontSize="inherit" fontSize="inherit"
> >
Create your{" "} {isCreate ? "Create your" : "Edit your"}{" "}
</Typography> </Typography>
<Typography <Typography
component="span" component="span"