-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trying to navigate using group button to group link page
- Loading branch information
1 parent
4abf34a
commit 01966f4
Showing
6 changed files
with
81 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { getMessaging, getToken } from "firebase/messaging"; | ||
|
||
// Get registration token. Initially this makes a network call, once retrieved | ||
// subsequent calls to getToken will return from cache. | ||
const messaging = getMessaging(); | ||
getToken(messaging, { vapidKey: '<YOUR_PUBLIC_VAPID_KEY_HERE>' }).then((currentToken) => { | ||
if (currentToken) { | ||
// Send the token to your server and update the UI if necessary | ||
// ... | ||
} else { | ||
// Show permission request UI | ||
console.log('No registration token available. Request permission to generate one.'); | ||
// ... | ||
} | ||
}).catch((err) => { | ||
console.log('An error occurred while retrieving token. ', err); | ||
// ... | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { StyleSheet, View, Pressable, Text } from 'react-native'; | ||
import React from 'react'; | ||
|
||
const MainScreen = ({ navigation }) => { | ||
return ( | ||
<View style={styles.container}> | ||
<Pressable | ||
style={styles.button} | ||
onPress={() => navigation.navigate('Auth')} | ||
android_ripple={{ color: '#FFF' }} | ||
> | ||
<Text style={styles.text}>Supper Snacks</Text> | ||
</Pressable> | ||
</View> | ||
); | ||
}; | ||
|
||
export default GroupLinkScreen; | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
backgroundColor: '#EBECF0', | ||
flex: 1, | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
}, | ||
button: { | ||
backgroundColor: '#407BFF', | ||
marginVertical: 10, | ||
paddingVertical: 10, | ||
width: '80%', | ||
alignItems: 'center', | ||
borderRadius: 4, | ||
}, | ||
text: { | ||
color: 'white', | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters