Created
October 15, 2022 14:07
-
-
Save el3um4s/07a41311e7ba58dd9668b519d5a3e0c2 to your computer and use it in GitHub Desktop.
MEDIUM - How To Show Notifications in Web Application - 15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
import notifications from "../Notification/Notification"; | |
const goHome = () => { | |
page.set("Home"); | |
if ($password != "") { | |
password.set(""); | |
notifications.send({ | |
message: "Password cleared", | |
type: "danger", | |
timeout: 1500, | |
}); | |
} | |
window.history.replaceState({}, document.title, "/"); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment