Skip to content

Commit 5db0996

Browse files
authored
Merge pull request Expensify#47983 from nkdengineer/fix/46495
fix: Onboarding task deeplinks used within the app redirect users to the web
2 parents aa69371 + 23197e5 commit 5db0996

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/libs/actions/Report.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,9 @@ Onyx.connect({
266266
callback: (value) => (allReportDraftComments = value),
267267
});
268268

269+
let environmentURL: string;
270+
Environment.getEnvironmentURL().then((url: string) => (environmentURL = url));
271+
269272
registerPaginationConfig({
270273
initialCommand: WRITE_COMMANDS.OPEN_REPORT,
271274
previousCommand: READ_COMMANDS.GET_OLDER_ACTIONS,
@@ -3370,8 +3373,8 @@ function completeOnboarding(
33703373
const taskDescription =
33713374
typeof task.description === 'function'
33723375
? task.description({
3373-
adminsRoomLink: `${CONFIG.EXPENSIFY.NEW_EXPENSIFY_URL}${ROUTES.REPORT_WITH_ID.getRoute(adminsChatReportID ?? '-1')}`,
3374-
workspaceLink: `${CONFIG.EXPENSIFY.NEW_EXPENSIFY_URL}${ROUTES.WORKSPACE_INITIAL.getRoute(onboardingPolicyID ?? '-1')}`,
3376+
adminsRoomLink: `${environmentURL}/${ROUTES.REPORT_WITH_ID.getRoute(adminsChatReportID ?? '-1')}`,
3377+
workspaceLink: `${environmentURL}/${ROUTES.WORKSPACE_INITIAL.getRoute(onboardingPolicyID ?? '-1')}`,
33753378
})
33763379
: task.description;
33773380
const currentTask = ReportUtils.buildOptimisticTaskReport(

0 commit comments

Comments
 (0)