From d1e0588324d1e6f171ef87795a29068b0fbf56aa Mon Sep 17 00:00:00 2001 From: AmbrishRamachandiran Date: Tue, 25 Jul 2023 09:41:21 +0530 Subject: [PATCH] Displaying an alert popup each time the Playlist is created or deleted Signed-off-by: AmbrishRamachandiran --- .changeset/chilly-keys-count.md | 5 +++++ .../components/EntityPlaylistDialog/EntityPlaylistDialog.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/chilly-keys-count.md diff --git a/.changeset/chilly-keys-count.md b/.changeset/chilly-keys-count.md new file mode 100644 index 0000000000..3bbc4e40dc --- /dev/null +++ b/.changeset/chilly-keys-count.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-playlist': patch +--- + +Displaying an alert popup each time the Playlist is created or deleted diff --git a/plugins/playlist/src/components/EntityPlaylistDialog/EntityPlaylistDialog.tsx b/plugins/playlist/src/components/EntityPlaylistDialog/EntityPlaylistDialog.tsx index 26b727fbc0..38ea156320 100644 --- a/plugins/playlist/src/components/EntityPlaylistDialog/EntityPlaylistDialog.tsx +++ b/plugins/playlist/src/components/EntityPlaylistDialog/EntityPlaylistDialog.tsx @@ -131,12 +131,12 @@ export const EntityPlaylistDialog = (props: EntityPlaylistDialogProps) => { await playlistApi.addPlaylistEntities(playlistId, [ stringifyEntityRef(entity!), ]); + navigate(playlistRoute({ playlistId })); alertApi.post({ message: `Added playlist '${playlist.name}'`, severity: 'success', display: 'transient', }); - navigate(playlistRoute({ playlistId })); } catch (e) { alertApi.post({ message: `Failed to add entity to ${singularTitleLowerCase}: ${e}`,