COnnection modal fix & notification basics
This commit is contained in:
@@ -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',
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user