Always create nav link for new screens

This commit is contained in:
Andrew Kingston 2023-08-23 11:21:53 +01:00
parent f1121a11a3
commit a7de2d8aca
1 changed files with 6 additions and 7 deletions

View File

@ -58,13 +58,12 @@
const response = await store.actions.screens.save(screen)
screenId = response._id
// Add link in layout for list screens
if (screen.props._instanceName.endsWith("List")) {
await store.actions.links.save(
screen.routing.route,
capitalise(screen.routing.route.split("/")[1])
)
}
// Add link in layout. We only ever actually create 1 screen now, even
// for autoscreens, so it's always safe to do this.
await store.actions.links.save(
screen.routing.route,
capitalise(screen.routing.route.split("/")[1])
)
}
// Go to new screen