testing universal links handler
This commit is contained in:
6
App.js
6
App.js
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user