summaryrefslogtreecommitdiffstats
path: root/ui/src/components/community.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-01-22 22:29:11 -0500
committerDessalines <tyhou13@gmx.com>2020-01-22 22:29:11 -0500
commit3b4258096c3c3dc160090436c9205e1ecf2e8e75 (patch)
treef07264d3de3b169c6140b2bf303ff7732d908b0a /ui/src/components/community.tsx
parent66af9623d90aadd47c9cf37faeac4f60f1d818d4 (diff)
Adding a toaster to replace alerts. Fixes #457
Diffstat (limited to 'ui/src/components/community.tsx')
-rw-r--r--ui/src/components/community.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/src/components/community.tsx b/ui/src/components/community.tsx
index 873b5a8a..dfd4d6b3 100644
--- a/ui/src/components/community.tsx
+++ b/ui/src/components/community.tsx
@@ -24,6 +24,7 @@ import {
routeSortTypeToEnum,
fetchLimit,
postRefetchSeconds,
+ toast,
} from '../utils';
import { T } from 'inferno-i18next';
import { i18n } from '../i18next';
@@ -257,7 +258,7 @@ export class Community extends Component<any, State> {
console.log(msg);
let op: UserOperation = msgOp(msg);
if (msg.error) {
- alert(i18n.t(msg.error));
+ toast(i18n.t(msg.error), 'danger');
this.context.router.history.push('/');
return;
} else if (op == UserOperation.GetCommunity) {