From 4c676b7577626ea9647cbb840b092847eabf8c72 Mon Sep 17 00:00:00 2001 From: Kamil Gabryjelski Date: Mon, 24 Jan 2022 11:41:39 +0100 Subject: [PATCH] feat(annotation): add toast feedback to annotation templates (#18116) --- .../src/views/CRUD/annotationlayers/AnnotationLayerModal.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/superset-frontend/src/views/CRUD/annotationlayers/AnnotationLayerModal.tsx b/superset-frontend/src/views/CRUD/annotationlayers/AnnotationLayerModal.tsx index 75ba970874e34..a7b78de39a32c 100644 --- a/superset-frontend/src/views/CRUD/annotationlayers/AnnotationLayerModal.tsx +++ b/superset-frontend/src/views/CRUD/annotationlayers/AnnotationLayerModal.tsx @@ -29,6 +29,7 @@ import { AnnotationLayerObject } from './types'; interface AnnotationLayerModalProps { addDangerToast: (msg: string) => void; + addSuccessToast: (msg: string) => void; layer?: AnnotationLayerObject | null; onLayerAdd?: (layer?: AnnotationLayerObject) => void; onHide: () => void; @@ -80,6 +81,7 @@ const LayerContainer = styled.div` const AnnotationLayerModal: FunctionComponent = ({ addDangerToast, + addSuccessToast, onLayerAdd, onHide, show, @@ -134,6 +136,7 @@ const AnnotationLayerModal: FunctionComponent = ({ } hide(); + addSuccessToast(t('Annotation template updated')); }); } } else if (currentLayer) { @@ -148,6 +151,7 @@ const AnnotationLayerModal: FunctionComponent = ({ } hide(); + addSuccessToast(t('Annotation template created')); }); } };