raven/packages/lib/hooks/useIsPushNotificationEnabled.ts
Prathamesh Kurunkar 96b43b4a84
feat: mobile add channel settings page (#1262)
* feat(mobile): add and remove channel members
* feat(mobile): add channel settings - archive, delete and change channel type
* feat(mobile): view channel members in a scroll view
* feat(mobile): edit channel name and description functionality
* feat(mobile): added modal for channel info and updated styles for channel header
---------
Co-authored-by: pranavmene2000 <menepraanv2000@gmail.com>
Co-authored-by: Pranav Mene <55917200+pranavmene2000@users.noreply.github.com>
Co-authored-by: Janhvi Patil <janhvipatil716@gmail.com>
2025-02-08 17:53:59 +05:30

16 lines
441 B
TypeScript

import { useFrappeGetCall } from 'frappe-react-sdk'
const useIsPushNotificationEnabled = () => {
const { data } = useFrappeGetCall<{ message: boolean }>('raven.api.notification.are_push_notifications_enabled', undefined, undefined, {
revalidateIfStale: true,
revalidateOnFocus: false,
revalidateOnReconnect: false,
})
return data?.message ? true : false
}
export default useIsPushNotificationEnabled