Skip to content

Commit

Permalink
Revert "feat: handle foreground push notifications (#161)"
Browse files Browse the repository at this point in the history
This reverts commit 6029a50.
  • Loading branch information
mateki0 authored Dec 22, 2022
1 parent b452433 commit 33ef18b
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 319 deletions.
54 changes: 0 additions & 54 deletions docs/docs/intro/examples/push-notifications-example.md

This file was deleted.

2 changes: 0 additions & 2 deletions example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,3 @@ buck-out/

# CocoaPods
/ios/Pods/
#firebase
android/app/google-services.json
21 changes: 2 additions & 19 deletions example/App.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,9 @@
import 'react-native-gesture-handler'
import React, { useEffect } from 'react'
import messaging from '@react-native-firebase/messaging'
import { AppNavigator } from './src/navigation'
import { useNotifications } from 'react-native-notificated'
import React from 'react'
import { NavigationContainer } from '@react-navigation/native'
import { AppNavigator } from './src/navigation'

const App = () => {
const { notify } = useNotifications()

useEffect(() => {
const unsubscribe = messaging().onMessage(async (remoteMessage) => {
notify('info', {
params: {
title: remoteMessage.notification?.title || '',
description: remoteMessage.notification?.body,
},
})
})

return unsubscribe
}, [notify])

return (
<NavigationContainer>
<AppNavigator />
Expand Down
1 change: 0 additions & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
apply plugin: "com.android.application"
apply plugin: 'com.google.gms.google-services'

import com.android.build.OutputFile

Expand Down
1 change: 0 additions & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ buildscript {
}
dependencies {
classpath("com.android.tools.build:gradle:4.2.2")
classpath 'com.google.gms:google-services:4.3.13'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
2 changes: 0 additions & 2 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
},
"dependencies": {
"@react-native-firebase/app": "^15.2.0",
"@react-native-firebase/messaging": "^15.2.0",
"@react-native-masked-view/masked-view": "^0.2.6",
"@react-navigation/drawer": "^6.1.8",
"@react-navigation/native": "^6.0.6",
Expand Down
Loading

0 comments on commit 33ef18b

Please sign in to comment.