From 23197e5a885681dd6b055d05c34fa107a9eea84f Mon Sep 17 00:00:00 2001 From: nkdengineer Date: Mon, 26 Aug 2024 10:41:42 +0700 Subject: [PATCH] fix: Onboarding task deeplinks used within the app redirect users to the web --- src/libs/actions/Report.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index ed984080ff6c..f542d5e134aa 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -266,6 +266,9 @@ Onyx.connect({ callback: (value) => (allReportDraftComments = value), }); +let environmentURL: string; +Environment.getEnvironmentURL().then((url: string) => (environmentURL = url)); + registerPaginationConfig({ initialCommand: WRITE_COMMANDS.OPEN_REPORT, previousCommand: READ_COMMANDS.GET_OLDER_ACTIONS, @@ -3363,8 +3366,8 @@ function completeOnboarding( const taskDescription = typeof task.description === 'function' ? task.description({ - adminsRoomLink: `${CONFIG.EXPENSIFY.NEW_EXPENSIFY_URL}${ROUTES.REPORT_WITH_ID.getRoute(adminsChatReportID ?? '-1')}`, - workspaceLink: `${CONFIG.EXPENSIFY.NEW_EXPENSIFY_URL}${ROUTES.WORKSPACE_INITIAL.getRoute(onboardingPolicyID ?? '-1')}`, + adminsRoomLink: `${environmentURL}/${ROUTES.REPORT_WITH_ID.getRoute(adminsChatReportID ?? '-1')}`, + workspaceLink: `${environmentURL}/${ROUTES.WORKSPACE_INITIAL.getRoute(onboardingPolicyID ?? '-1')}`, }) : task.description; const currentTask = ReportUtils.buildOptimisticTaskReport(