mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-05 20:15:01 +00:00
Hide toast on click.
This commit is contained in:
parent
52b062720f
commit
cca5ea4d36
1 changed files with 6 additions and 2 deletions
6
ui/src/utils.ts
vendored
6
ui/src/utils.ts
vendored
|
@ -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: () => {
|
||||
if (toast) {
|
||||
toast.hideToast();
|
||||
router.history.push(link);
|
||||
}
|
||||
},
|
||||
}).showToast();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue