From 0414edeade7761f1f5db79f6d6bb35c1f457d3ae Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sat, 21 Mar 2020 11:21:15 -0400 Subject: Hide toast on click. --- ui/src/utils.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ui/src/utils.ts') 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}
${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(); } -- cgit v1.2.3