MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / isNotificationEnabled

Function isNotificationEnabled

apps/web/utilities/notification.ts:3–8  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import { localStorage } from '@linen/utilities/storage';
2
3export const isNotificationEnabled = (): boolean => {
4 return (
5 localStorage.get('notification.permission') === 'granted' &&
6 window.Notification?.permission === 'granted'
7 );
8};
9
10const defaultCallback = (callbackUrl: string) => {
11 window.open(callbackUrl, '_self');

Callers 1

notifyFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected