Skip to content

Commit

Permalink
feat(annotation): add toast feedback to annotation templates (apache#…
Browse files Browse the repository at this point in the history
  • Loading branch information
kgabryje authored and shcoderAlex committed Feb 7, 2022
1 parent 817bb2f commit 4c676b7
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -80,6 +81,7 @@ const LayerContainer = styled.div`

const AnnotationLayerModal: FunctionComponent<AnnotationLayerModalProps> = ({
addDangerToast,
addSuccessToast,
onLayerAdd,
onHide,
show,
Expand Down Expand Up @@ -134,6 +136,7 @@ const AnnotationLayerModal: FunctionComponent<AnnotationLayerModalProps> = ({
}

hide();
addSuccessToast(t('Annotation template updated'));
});
}
} else if (currentLayer) {
Expand All @@ -148,6 +151,7 @@ const AnnotationLayerModal: FunctionComponent<AnnotationLayerModalProps> = ({
}

hide();
addSuccessToast(t('Annotation template created'));
});
}
};
Expand Down

0 comments on commit 4c676b7

Please sign in to comment.