Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"test:debug": "TZ=utc NODE_OPTIONS='--inspect-brk --experimental-vm-modules' jest --runInBand",
"perf-test": "NODE_OPTIONS=--experimental-vm-modules npx reassure",
"typecheck": "NODE_OPTIONS=--max_old_space_size=8192 tsc",
"lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=285 --cache --cache-location=node_modules/.cache/eslint",
"lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=283 --cache --cache-location=node_modules/.cache/eslint",
"lint-changed": "NODE_OPTIONS=--max_old_space_size=8192 ./scripts/lintChanged.sh",
"lint-watch": "npx eslint-watch --watch --changed",
"shellcheck": "./scripts/shellCheck.sh",
Expand Down
19 changes: 5 additions & 14 deletions src/libs/actions/Link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ import ROUTES from '@src/ROUTES';
import {canAnonymousUserAccessRoute, isAnonymousUser, signOutAndRedirectToSignIn} from './Session';

let isNetworkOffline = false;
Onyx.connect({
// Use connectWithoutView since this is to open an external link and doesn't affect any UI
Onyx.connectWithoutView({
key: ONYXKEYS.NETWORK,
callback: (value) => (isNetworkOffline = value?.isOffline ?? false),
});

let currentUserEmail = '';
let currentUserAccountID: number = CONST.DEFAULT_NUMBER_ID;
Onyx.connect({
// Use connectWithoutView since this is to open an external link and doesn't affect any UI
Onyx.connectWithoutView({
key: ONYXKEYS.SESSION,
callback: (value) => {
currentUserEmail = value?.email ?? '';
Expand Down Expand Up @@ -237,15 +239,4 @@ function getTravelDotLink(policyID: OnyxEntry<string>) {
});
}

export {
buildOldDotURL,
openOldDotLink,
openExternalLink,
openLink,
getInternalNewExpensifyPath,
getInternalExpensifyPath,
openTravelDotLink,
buildTravelDotURL,
openExternalLinkWithToken,
getTravelDotLink,
};
export {openOldDotLink, openExternalLink, openLink, getInternalNewExpensifyPath, getInternalExpensifyPath, openTravelDotLink, buildTravelDotURL, openExternalLinkWithToken, getTravelDotLink};
Loading