testing universal links handler

This commit is contained in:
Adolfo Reyna
2023-03-10 22:38:52 -06:00
parent 3f44076709
commit 7be9b89c5a
4 changed files with 104 additions and 1 deletions

6
App.js
View File

@@ -26,6 +26,7 @@ import MediaView from './components/MediaView.js';
import { useSnapshot } from 'valtio';
import GlobalState from './contexts/GlobalState.js';
import NewGroup from './Views/NewGroup.js';
import * as Linking2 from 'expo-linking';
import { Linking } from 'expo';
@@ -111,6 +112,11 @@ const MainNavigation = ({route}) => {
const [notification, setNotification] = useState(false);
const notificationListener = useRef();
const responseListener = useRef();
const url = Linking2.useURL();
useEffect(() => {
// Do something with url
alert(url);
}, [url]);
useEffect(() => {
registerForPushNotificationsAsync().then(async (token) => {