From 3b4258096c3c3dc160090436c9205e1ecf2e8e75 Mon Sep 17 00:00:00 2001
From: Dessalines <tyhou13@gmx.com>
Date: Wed, 22 Jan 2020 22:29:11 -0500
Subject: Adding a toaster to replace alerts. Fixes #457

---
 ui/src/components/comment-form.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'ui/src/components/comment-form.tsx')

diff --git a/ui/src/components/comment-form.tsx b/ui/src/components/comment-form.tsx
index f5816899..6fbdc5de 100644
--- a/ui/src/components/comment-form.tsx
+++ b/ui/src/components/comment-form.tsx
@@ -16,6 +16,7 @@ import {
   mdToHtml,
   randomStr,
   markdownHelpUrl,
+  toast,
 } from '../utils';
 import { WebSocketService, UserService } from '../services';
 import autosize from 'autosize';
@@ -293,7 +294,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
       .catch(error => {
         i.state.imageLoading = false;
         i.setState(i.state);
-        alert(error);
+        toast(error, 'danger');
       });
   }
 
-- 
cgit v1.2.3

