diff options
author | Dessalines <tyhou13@gmx.com> | 2020-01-22 22:29:11 -0500 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-01-22 22:29:11 -0500 |
commit | 3b4258096c3c3dc160090436c9205e1ecf2e8e75 (patch) | |
tree | f07264d3de3b169c6140b2bf303ff7732d908b0a /ui/src/components/search.tsx | |
parent | 66af9623d90aadd47c9cf37faeac4f60f1d818d4 (diff) |
Adding a toaster to replace alerts. Fixes #457
Diffstat (limited to 'ui/src/components/search.tsx')
-rw-r--r-- | ui/src/components/search.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/src/components/search.tsx b/ui/src/components/search.tsx index 94bbbdb9..d2280cb2 100644 --- a/ui/src/components/search.tsx +++ b/ui/src/components/search.tsx @@ -23,6 +23,7 @@ import { routeSortTypeToEnum, pictshareAvatarThumbnail, showAvatars, + toast, } from '../utils'; import { PostListing } from './post-listing'; import { SortSelect } from './sort-select'; @@ -480,7 +481,7 @@ export class Search extends Component<any, SearchState> { console.log(msg); let op: UserOperation = msgOp(msg); if (msg.error) { - alert(i18n.t(msg.error)); + toast(i18n.t(msg.error), 'danger'); return; } else if (op == UserOperation.Search) { let res: SearchResponse = msg; |