From cca5ea4d36fd1cb2a87d374d6cd37539034dfb3e Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sat, 21 Mar 2020 11:21:15 -0400 Subject: [PATCH] Hide toast on click. --- ui/src/utils.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/src/utils.ts b/ui/src/utils.ts index cab1fd5b0..48bd175e2 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(); }