Skip to content
Snippets Groups Projects
Commit 1e89c457 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

show info that comment has been added

parent abcc426c
No related branches found
No related tags found
2 merge requests!231Development,!224Resolve "A popup notification after adding comment"
Pipeline #94008 passed
......@@ -8,6 +8,7 @@ import { useAppSelector } from '@/redux/hooks/useAppSelector';
import { lastRightClickSelector } from '@/redux/models/models.selectors';
import { closeModal } from '@/redux/modal/modal.slice';
import { getComments } from '@/redux/comment/thunks/getComments';
import { showToast } from '@/utils/showToast';
export const AddCommentModal: React.FC = () => {
const dispatch = useAppDispatch();
......@@ -30,6 +31,11 @@ export const AddCommentModal: React.FC = () => {
await dispatch(addComment(data));
dispatch(closeModal());
dispatch(getComments());
showToast({
type: 'success',
message:
'Thank you for your feedback, your comment has been placed on the map. To see all comments, use the “show comments” button in the upper right',
});
};
return (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment