Skip to content

Commit 5166057

Browse files
subirjollySubir Jolly
andauthored
feat: add delete notebook success message notification (#3482)
* feat: add delete flow success message notification * chore: move notification to correct place Co-authored-by: Subir Jolly <sjolly@influxdata.com>
1 parent 068f9d7 commit 5166057

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/flows/context/flow.list.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import {notify} from 'src/shared/actions/notifications'
2626
import {
2727
notebookCreateFail,
2828
notebookDeleteFail,
29+
notebookDeleteSuccess,
2930
} from 'src/shared/copy/notifications'
3031
import {incrementCloneName} from 'src/utils/naming'
3132

@@ -261,6 +262,7 @@ export const FlowListProvider: FC = ({children}) => {
261262
}
262263
try {
263264
await deleteAPI({id})
265+
dispatch(notify(notebookDeleteSuccess()))
264266
} catch (error) {
265267
dispatch(notify(notebookDeleteFail()))
266268
}

src/shared/copy/notifications.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,6 +1235,11 @@ export const notebookDeleteFail = (): Notification => ({
12351235
message: `Failed to delete Notebook, please try again.`,
12361236
})
12371237

1238+
export const notebookDeleteSuccess = (): Notification => ({
1239+
...defaultSuccessNotification,
1240+
message: 'Notebook was deleted successfully',
1241+
})
1242+
12381243
export const csvUploaderErrorNotification = (
12391244
message: string
12401245
): Notification => ({

0 commit comments

Comments
 (0)