Fix push page not refetching

This commit is contained in:
xmflsct 2023-02-01 15:04:22 +01:00
parent 0dacd5ec89
commit 2c96991ca0
1 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,7 @@ const TabMePush: React.FC = () => {
const appsQuery = useAppsQuery({
options: {
enabled: false,
onSuccess: async data => {
if (data.vapid_key) {
await checkPush()
@ -49,6 +50,9 @@ const TabMePush: React.FC = () => {
}
}
})
useEffect(() => {
appsQuery.refetch()
}, [])
const checkPush = async () => {
const permissions = await Notifications.getPermissionsAsync()