Skip to content

Commit

Permalink
Merge pull request Expensify#47983 from nkdengineer/fix/46495
Browse files Browse the repository at this point in the history
fix: Onboarding task deeplinks used within the app redirect users to the web
  • Loading branch information
arosiclair committed Sep 3, 2024
2 parents aa69371 + 23197e5 commit 5db0996
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -3370,8 +3373,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(
Expand Down

0 comments on commit 5db0996

Please sign in to comment.