diff --git a/src/libs/shouldSkipDeepLinkNavigation.ts b/src/libs/shouldSkipDeepLinkNavigation/index.desktop.ts similarity index 100% rename from src/libs/shouldSkipDeepLinkNavigation.ts rename to src/libs/shouldSkipDeepLinkNavigation/index.desktop.ts diff --git a/src/libs/shouldSkipDeepLinkNavigation/index.ts b/src/libs/shouldSkipDeepLinkNavigation/index.ts new file mode 100644 index 000000000000..8a2d8035507f --- /dev/null +++ b/src/libs/shouldSkipDeepLinkNavigation/index.ts @@ -0,0 +1,5 @@ +// eslint-disable-next-line @typescript-eslint/no-unused-vars +export default function shouldSkipDeepLinkNavigation(route: string) { + // no-op for all other platforms + return false; +} diff --git a/src/libs/shouldSkipDeepLinkNavigation/index.web.ts b/src/libs/shouldSkipDeepLinkNavigation/index.web.ts new file mode 100644 index 000000000000..0a2d7f533e74 --- /dev/null +++ b/src/libs/shouldSkipDeepLinkNavigation/index.web.ts @@ -0,0 +1,12 @@ +import ROUTES from '@src/ROUTES'; + +export default function shouldSkipDeepLinkNavigation(route: string) { + // When deep-linking to desktop app with `transition` route we don't want to call navigate + // on the route because it will display an infinite loading indicator. + // See issue: https://github.com/Expensify/App/issues/33149 + if (route.includes(ROUTES.TRANSITION_BETWEEN_APPS)) { + return true; + } + + return false; +}