summaryrefslogtreecommitdiffstats
path: root/ui/src/utils.ts
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-03-21 11:21:15 -0400
committerDessalines <tyhou13@gmx.com>2020-03-21 11:21:15 -0400
commit0414edeade7761f1f5db79f6d6bb35c1f457d3ae (patch)
tree0304a55e6974cc3becc19ac0980cd1adaf72b777 /ui/src/utils.ts
parentef9ae09c2bfa318030e9f164a8f386bce9e26562 (diff)
Hide toast on click.
Diffstat (limited to 'ui/src/utils.ts')
-rw-r--r--ui/src/utils.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/src/utils.ts b/ui/src/utils.ts
index cab1fd5b..48bd175e 100644
--- a/ui/src/utils.ts
+++ b/ui/src/utils.ts
@@ -444,7 +444,8 @@ export function messageToastify(
router: any
) {
let backgroundColor = `var(--light)`;
- Toastify({
+
+ let toast = Toastify({
text: `${body}<br />${creator}`,
avatar: avatar,
backgroundColor: backgroundColor,
@@ -453,7 +454,10 @@ export function messageToastify(
position: 'right',
duration: 0,
onClick: () => {
- router.history.push(link);
+ if (toast) {
+ toast.hideToast();
+ router.history.push(link);
+ }
},
}).showToast();
}