start refacto home and fix description
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
import { useContext, useState, useEffect } from "reactn";
|
||||
import * as Linking from "expo-linking";
|
||||
|
||||
import { UserDataContext } from "./UserDataProvider";
|
||||
import { isWeb } from "../hooks/useLayoutType";
|
||||
import { navigateToTask } from "../navigation/NavigationService";
|
||||
import { SplashAnimationContext } from "./SplashAnimationProvider";
|
||||
|
||||
const appJson = require("../../app.json");
|
||||
|
||||
export const storeURL = {
|
||||
@@ -21,12 +19,12 @@ const UniversalLinkProvider = ({ children }) => {
|
||||
|
||||
useEffect(() => {
|
||||
const handleDeepLink = async (event) => {
|
||||
console.log("event", event);
|
||||
// console.log("event", event);
|
||||
|
||||
const { path = "", queryParams } = Linking.parse(event.url);
|
||||
|
||||
console.log("path", path);
|
||||
console.log("queryParams", queryParams);
|
||||
// console.log("path", path);
|
||||
// console.log("queryParams", queryParams);
|
||||
|
||||
const appSchemeURL = `${
|
||||
appJson.expo.scheme
|
||||
@@ -66,7 +64,7 @@ const UniversalLinkProvider = ({ children }) => {
|
||||
const initDeepLinkHandling = async () => {
|
||||
const initialUrl = await Linking.getInitialURL();
|
||||
if (initialUrl) {
|
||||
console.log("Initial URL:", initialUrl);
|
||||
// console.log("Initial URL:", initialUrl);
|
||||
handleDeepLink({ url: initialUrl });
|
||||
}
|
||||
|
||||
@@ -82,14 +80,14 @@ const UniversalLinkProvider = ({ children }) => {
|
||||
|
||||
useEffect(() => {
|
||||
if (tempTaskData && currentUID && isFullyLoaded) {
|
||||
console.log("try to navigate to task");
|
||||
// console.log("try to navigate to task");
|
||||
navigateToTask(tempTaskData);
|
||||
setTempTaskData(null);
|
||||
}
|
||||
}, [tempTaskData, currentUID, isFullyLoaded]);
|
||||
|
||||
const handleParams = (path) => {
|
||||
console.log("path", path);
|
||||
// console.log("path", path);
|
||||
|
||||
cleanURL();
|
||||
};
|
||||
@@ -98,7 +96,7 @@ const UniversalLinkProvider = ({ children }) => {
|
||||
if (isWeb) {
|
||||
const url = new URL(window.location);
|
||||
|
||||
console.log(url);
|
||||
// console.log(url);
|
||||
|
||||
url.search = "";
|
||||
window.history.replaceState({}, document.title, url.origin.toString());
|
||||
|
||||
Reference in New Issue
Block a user