@@ -12,13 +12,10 @@ import {openReportFromDeepLink} from './libs/actions/Link';
1212import * as Report from './libs/actions/Report' ;
1313import { hasAuthToken , isAnonymousUser } from './libs/actions/Session' ;
1414import Log from './libs/Log' ;
15- import normalizePath from './libs/Navigation/helpers/normalizePath' ;
16- import { setPendingConciergeDeepLink , setPendingHomeDeepLinkIfNoPendingConcierge } from './libs/PendingConciergeDeepLink' ;
1715import { getReportIDFromLink } from './libs/ReportUtils' ;
1816import { endSpan } from './libs/telemetry/activeSpans' ;
1917import { hasSecureLinkKey } from './libs/Url' ;
2018import ONYXKEYS from './ONYXKEYS' ;
21- import ROUTES from './ROUTES' ;
2219import { hasSeenTourSelector } from './selectors/Onboarding' ;
2320import isLoadingOnyxValue from './types/utils/isLoadingOnyxValue' ;
2421
@@ -27,36 +24,6 @@ type DeepLinkHandlerProps = {
2724 onInitialUrl : ( url : Route | null ) => void ;
2825} ;
2926
30- function getNormalizedCurrentPath ( ) {
31- if ( typeof window === 'undefined' ) {
32- return '' ;
33- }
34-
35- return normalizePath ( window . location . pathname ) . replace ( / \/ $ / , '' ) || '/' ;
36- }
37-
38- function getNormalizedPathFromURL ( url : string ) {
39- let path = url ;
40-
41- try {
42- const parsedURL = new URL ( url ) ;
43- path = parsedURL . protocol === 'http:' || parsedURL . protocol === 'https:' ? parsedURL . pathname : `${ parsedURL . host } ${ parsedURL . pathname } ` ;
44- } catch {
45- // If URL parsing fails, treat the value as a route path.
46- }
47-
48- return normalizePath ( path ) . replace ( / \/ $ / , '' ) || '/' ;
49- }
50-
51- function isCurrentPathConcierge ( ) {
52- return getNormalizedCurrentPath ( ) === normalizePath ( ROUTES . CONCIERGE ) ;
53- }
54-
55- function isCurrentPathRootOrOnboarding ( ) {
56- const normalizedPath = getNormalizedCurrentPath ( ) ;
57- return normalizedPath === '/' || normalizedPath === normalizePath ( ROUTES . ONBOARDING_ROOT . route ) || normalizedPath . startsWith ( `${ normalizePath ( ROUTES . ONBOARDING_ROOT . route ) } /` ) ;
58- }
59-
6027/**
6128 * Component that does not render anything but isolates the COLLECTION.REPORT Onyx subscription
6229 * from the root Expensify component to prevent cascading re-renders of the
@@ -130,10 +97,6 @@ function DeepLinkHandler({onInitialUrl}: DeepLinkHandlerProps) {
13097 initialUrlProcessed . current = true ;
13198 onInitialUrl ( url as Route ) ;
13299
133- if ( ! isCurrentlyAuthenticated && isCurrentPathConcierge ( ) && ( ! url || getNormalizedPathFromURL ( url ) !== normalizePath ( ROUTES . CONCIERGE ) ) ) {
134- setPendingConciergeDeepLink ( ) ;
135- }
136-
137100 if ( url ) {
138101 if ( conciergeReportID === undefined ) {
139102 Log . info ( '[Deep link] conciergeReportID is undefined when processing initial URL' , false , { url} ) ;
@@ -144,10 +107,6 @@ function DeepLinkHandler({onInitialUrl}: DeepLinkHandlerProps) {
144107 openReportFromDeepLink ( url , allReports , isCurrentlyAuthenticated , conciergeReportID , introSelected , isSelfTourViewed , betas ) ;
145108 trackPendingPublicRoomFromDeepLink ( url , isCurrentlyAuthenticated ) ;
146109 } else {
147- if ( ! isCurrentlyAuthenticated && isCurrentPathRootOrOnboarding ( ) ) {
148- // A missing initial URL at root/onboarding can happen during startup, so don't override a stored /concierge intent.
149- setPendingHomeDeepLinkIfNoPendingConcierge ( ) ;
150- }
151110 Report . doneCheckingPublicRoom ( ) ;
152111 }
153112
0 commit comments