Skip to content

Commit

Permalink
SLVUU-69: Display toast on failed layout load
Browse files Browse the repository at this point in the history
  • Loading branch information
pling-scottlogic committed Nov 21, 2023
1 parent 0582ea4 commit 7210e13
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export const LayoutManagementProvider = (
notify({
type: NotificationLevel.Error,
header: "Failed to Save Layout",
body: `Failed to save layout ${metadata.name} to server`,
body: `Failed to save layout ${metadata.name}`,
});
console.error("Error occurred while saving layout", error);
});
Expand All @@ -159,9 +159,17 @@ export const LayoutManagementProvider = (
active: prev.children?.length ?? 0,
children: [...(prev.children || []), layoutJson],
});
})
.catch((error: Error) => {
notify({
type: NotificationLevel.Error,
header: "Failed to Load Layout",
body: "Failed to load the requested layout",
});
console.error("Error occurred while loading layout", error);
});
},
[setApplicationLayout]
[notify, setApplicationLayout]
);

return (
Expand Down

0 comments on commit 7210e13

Please sign in to comment.