COnnection modal fix & notification basics

This commit is contained in:
Sacha Weatherstone
2021-12-17 00:13:58 +11:00
parent c3a4f81b1c
commit 8b221e28c5
10 changed files with 160 additions and 93 deletions
+12
View File
@@ -0,0 +1,12 @@
export const requestNotificationPermission = async (): Promise<void> => {
if (window.Notification && Notification.permission !== 'denied') {
await Notification.requestPermission();
}
};
export const showNotification = (title: string, body: string): void => {
new Notification(title, {
body,
icon: 'android-512.png',
});
};