Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c4e8b9e
migrate EDIT_REPORT_FIELD
huult May 14, 2026
94de28d
migrate PROFILE_AVATAR
huult May 14, 2026
8330650
migrate NEW_REPORT_WORKSPACE_SELECTION
huult May 14, 2026
34f8fe8
migrate PROFILE
huult May 14, 2026
de12084
update eslint
huult May 14, 2026
0758b20
Merge remote-tracking branch 'upstream/main' into 83369-migrate-repor…
huult May 15, 2026
e842dec
update old route
huult May 15, 2026
22f591c
update reset key
huult May 15, 2026
831c3a0
Merge remote-tracking branch 'upstream/main' into 83369-migrate-repor…
huult May 16, 2026
7c94c70
update dynamic route
huult May 16, 2026
a07d927
update test
huult May 16, 2026
56054d8
update code test
huult May 16, 2026
bd544a0
Merge remote-tracking branch 'upstream/main' into 83369-migrate-repor…
huult May 18, 2026
5eee6bd
update testID and update type
huult May 18, 2026
f2c4130
Merge remote-tracking branch 'upstream/main' into 83369-migrate-repor…
huult May 20, 2026
dd97b72
Merge remote-tracking branch 'upstream/main' into 83369-migrate-repor…
huult May 21, 2026
74bcfdc
update route path
huult May 21, 2026
92b1ba8
remove import unused
huult May 21, 2026
19afdcc
Merge remote-tracking branch 'upstream/main' into 83369-migrate-repor…
huult May 21, 2026
30b78d6
update route path
huult May 21, 2026
a880b53
update prettier
huult May 21, 2026
2555c47
Merge remote-tracking branch 'upstream/main' into 83369-migrate-repor…
huult May 22, 2026
3f41023
update entry screen
huult May 22, 2026
e27a9b3
Merge remote-tracking branch 'upstream/main' into 83369-migrate-repor…
huult May 22, 2026
cf0265d
remove basePath
huult May 22, 2026
f584ec9
Merge remote-tracking branch 'upstream/main' into 83369-migrate-repor…
huult May 22, 2026
854512d
fix eslint
huult May 22, 2026
3e4c429
update entry screen
huult May 22, 2026
24d07d8
Update policy param
huult May 22, 2026
ac441f7
Merge remote-tracking branch 'upstream/main' into 83369-migrate-repor…
huult May 23, 2026
721416b
Merge remote-tracking branch 'upstream/main' into 83369-migrate-repor…
huult May 25, 2026
524abdf
Merge remote-tracking branch 'upstream/main' into 83369-migrate-repor…
huult May 26, 2026
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
70 changes: 26 additions & 44 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,28 @@ const DYNAMIC_ROUTES = {
SCREENS.REPORT_CHANGE_WORKSPACE.ROOT,
],
},
EDIT_REPORT_FIELD: {
path: 'edit/policyField/:policyID/:fieldID',
entryScreens: [SCREENS.REPORT, SCREENS.RIGHT_MODAL.SEARCH_REPORT, SCREENS.RIGHT_MODAL.EXPENSE_REPORT, SCREENS.RIGHT_MODAL.SEARCH_MONEY_REQUEST_REPORT, SCREENS.REPORT_DETAILS.ROOT],
getRoute: (policyID: string, fieldID: string) => `edit/policyField/${policyID}/${encodeURIComponent(fieldID)}` as const,
},
PROFILE: {
path: 'a/:accountID',
entryScreens: ['*'],
getRoute: (accountID?: number, login?: string) => getUrlWithParams(`a/${accountID}`, {login}),
queryParams: ['login'],
},
PROFILE_AVATAR: {
path: 'avatar/:accountID',
Comment thread
huult marked this conversation as resolved.
entryScreens: ['*'],
getRoute: (accountID: number) => `avatar/${accountID}` as const,
},
NEW_REPORT_WORKSPACE_SELECTION: {
path: 'new-report-workspace-selection',
entryScreens: ['*'],
getRoute: (isMovingExpenses?: boolean) => `new-report-workspace-selection${isMovingExpenses ? '?isMovingExpenses=true' : ''}` as const,
queryParams: ['isMovingExpenses'],
},
NETSUITE_AUTO_SYNC: {
path: 'netsuite-autosync',
entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_ADVANCED, SCREENS.WORKSPACE.ACCOUNTING.CARD_RECONCILIATION],
Expand Down Expand Up @@ -452,7 +474,7 @@ const DYNAMIC_ROUTES = {
},
NOTIFICATION_PREFERENCES: {
path: 'notification-preferences',
entryScreens: [SCREENS.REPORT_SETTINGS.ROOT, SCREENS.PROFILE_ROOT],
entryScreens: [SCREENS.REPORT_SETTINGS.ROOT, SCREENS.DYNAMIC_PROFILE],
getRoute: (reportID: string) => getUrlWithParams('notification-preferences', {reportID}),
queryParams: ['reportID'],
},
Expand Down Expand Up @@ -512,7 +534,7 @@ const DYNAMIC_ROUTES = {
},
EXPENSIFY_CARD_DETAILS: {
path: 'expensify-card-details/:cardID/:policyID',
entryScreens: [SCREENS.WORKSPACE.EXPENSIFY_CARD, SCREENS.REPORT, SCREENS.RIGHT_MODAL.SEARCH_REPORT, SCREENS.RIGHT_MODAL.SEARCH_MONEY_REQUEST_REPORT, SCREENS.PROFILE_ROOT],
entryScreens: [SCREENS.WORKSPACE.EXPENSIFY_CARD, SCREENS.REPORT, SCREENS.RIGHT_MODAL.SEARCH_REPORT, SCREENS.RIGHT_MODAL.SEARCH_MONEY_REQUEST_REPORT, SCREENS.DYNAMIC_PROFILE],
getRoute: (cardID: string, policyID: string) => `expensify-card-details/${cardID}/${policyID}` as const,
},
EXPENSIFY_CARD_LIMIT_TYPE: {
Expand Down Expand Up @@ -671,7 +693,7 @@ const DYNAMIC_ROUTES = {
SCREENS.RIGHT_MODAL.EXPENSE_REPORT,
SCREENS.RIGHT_MODAL.SEARCH_MONEY_REQUEST_REPORT,
SCREENS.REPORT_DETAILS.ROOT,
SCREENS.PROFILE_ROOT,
SCREENS.DYNAMIC_PROFILE,
],
getRoute: (reportID?: string) => getUrlWithParams('notes', reportID ? {reportID} : {}),
queryParams: ['reportID'],
Expand All @@ -684,7 +706,7 @@ const DYNAMIC_ROUTES = {
SCREENS.RIGHT_MODAL.EXPENSE_REPORT,
SCREENS.RIGHT_MODAL.SEARCH_MONEY_REQUEST_REPORT,
SCREENS.REPORT_DETAILS.ROOT,
SCREENS.PROFILE_ROOT,
SCREENS.DYNAMIC_PROFILE,
SCREENS.DYNAMIC_PRIVATE_NOTES_LIST,
],
getRoute: (accountID: number, reportID?: string) => {
Expand Down Expand Up @@ -830,20 +852,6 @@ const ROUTES = {
CONCIERGE: 'concierge',
TRACK_EXPENSE: 'track-expense',
SUBMIT_EXPENSE: 'submit-expense',
PROFILE: {
route: 'a/:accountID',
getRoute: (accountID?: number, backTo?: string, login?: string) => {
const baseRoute = getUrlWithBackToParam(`a/${accountID}`, backTo);
const loginParam = login ? `?login=${encodeURIComponent(login)}` : '';
return `${baseRoute}${loginParam}` as const;
},
},
PROFILE_AVATAR: {
route: 'a/:accountID/avatar',

getRoute: (accountID: number, backTo?: string) => getUrlWithBackToParam(`a/${accountID}/avatar` as const, backTo),
},

// This is a special validation URL that will take the user to /workspace/new after validation. This is used
// when linking users from e.com in order to share a session in this app.
ENABLE_PAYMENTS: 'enable-payments',
Expand Down Expand Up @@ -1267,19 +1275,6 @@ const ROUTES = {
NEW_CHAT_EDIT_NAME: 'new/chat/confirm/name/edit',
NEW_ROOM: 'new/room',

NEW_REPORT_WORKSPACE_SELECTION: {
route: 'new-report-workspace-selection',
getRoute: (isMovingExpenses?: boolean, backTo?: string) => {
const params = new URLSearchParams();
if (isMovingExpenses) {
params.set('isMovingExpenses', 'true');
}
const query = params.toString();
const baseRoute = `new-report-workspace-selection${query ? `?${query}` : ''}` as const;

return getUrlWithBackToParam(baseRoute, backTo);
},
},
REPORT: 'r',
REPORT_WITH_ID: {
route: 'r/:reportID?/:reportActionID?',
Expand Down Expand Up @@ -1334,19 +1329,6 @@ const ROUTES = {
route: 'r/:threadReportID/edit/currency',
getRoute: (threadReportID: string, currency: string, backTo: string) => `r/${threadReportID}/edit/currency?currency=${currency}&backTo=${backTo}` as const,
},
EDIT_REPORT_FIELD_REQUEST: {
route: 'r/:reportID/edit/policyField/:policyID/:fieldID',
getRoute: (reportID: string | undefined, policyID: string | undefined, fieldID: string, backTo?: string) => {
if (!policyID || !reportID) {
Log.warn('Invalid policyID or reportID is used to build the EDIT_REPORT_FIELD_REQUEST route', {
policyID,
reportID,
});
}

return getUrlWithBackToParam(`r/${reportID}/edit/policyField/${policyID}/${encodeURIComponent(fieldID)}` as const, backTo);
},
},
REPORT_WITH_ID_DETAILS_SHARE_CODE: {
route: 'r/:reportID/details/shareCode',
getRoute: (reportID: string | undefined, backTo?: string) => {
Expand Down
8 changes: 4 additions & 4 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const PROTECTED_SCREENS = {
const SCREENS = {
...PROTECTED_SCREENS,
REPORT: 'Report',
PROFILE_AVATAR: 'ProfileAvatar',
DYNAMIC_PROFILE_AVATAR: 'Dynamic_Profile_Avatar',
WORKSPACE_AVATAR: 'WorkspaceAvatar',
WORKSPACE_DOCUMENT: 'WorkspaceDocument',
REPORT_AVATAR: 'ReportAvatar',
Expand Down Expand Up @@ -516,7 +516,7 @@ const SCREENS = {
},

NEW_REPORT_WORKSPACE_SELECTION: {
ROOT: 'NewReportWorkspaceSelection_Root',
DYNAMIC_ROOT: 'Dynamic_NewReportWorkspaceSelection_Root',
},

SET_DEFAULT_WORKSPACE: 'SetDefaultWorkspace',
Expand Down Expand Up @@ -915,7 +915,7 @@ const SCREENS = {

EDIT_REQUEST: {
CURRENCY: 'EditRequest_Currency',
REPORT_FIELD: 'EditRequest_ReportField',
DYNAMIC_REPORT_FIELD: 'Dynamic_EditRequest_ReportField',
},

NEW_CHAT: {
Expand Down Expand Up @@ -978,7 +978,7 @@ const SCREENS = {
WALLET_STATEMENT_ROOT: 'WalletStatement_Root',
SIGN_IN_ROOT: 'SignIn_Root',
DETAILS_ROOT: 'Details_Root',
PROFILE_ROOT: 'Profile_Root',
DYNAMIC_PROFILE: 'Dynamic_Profile_Root',
AUTO_SUBMIT_ROOT: 'AutoSubmit_Modal_Root',
DYNAMIC_CHANGE_POLICY_EDUCATIONAL_ROOT: 'DynamicChangePolicyEducational_Root',
REPORT_DESCRIPTION_ROOT: 'Report_Description_Root',
Expand Down
13 changes: 9 additions & 4 deletions src/components/AvatarWithDisplayName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useStyleUtils from '@hooks/useStyleUtils';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import createDynamicRoute from '@libs/Navigation/helpers/dynamicRoutesUtils/createDynamicRoute';
import Navigation from '@libs/Navigation/Navigation';
import {getPersonalDetailsForAccountIDs} from '@libs/OptionsListUtils';
import {getHumanAgentAccountIDFromReportAction, getHumanAgentFirstName} from '@libs/ReportActionsUtils';
Expand All @@ -37,7 +38,7 @@ import {
import variables from '@styles/variables';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import ROUTES, {DYNAMIC_ROUTES} from '@src/ROUTES';
import type {Policy, Report} from '@src/types/onyx';
import {getButtonRole} from './Button/utils';
import DisplayNames from './DisplayNames';
Expand Down Expand Up @@ -232,7 +233,11 @@ function AvatarWithDisplayName({

const navigateToEditReportTitle = (event?: GestureResponderEvent | KeyboardEvent) => {
event?.stopPropagation?.();
Navigation.navigate(ROUTES.EDIT_REPORT_FIELD_REQUEST.getRoute(report?.reportID, report?.policyID, CONST.REPORT_FIELD_TITLE_FIELD_ID, Navigation.getReportRHPActiveRoute()));
if (!report?.policyID) {
return;
}

Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.EDIT_REPORT_FIELD.getRoute(report.policyID, CONST.REPORT_FIELD_TITLE_FIELD_ID)));
};

const showActorDetails = () => {
Expand All @@ -243,7 +248,7 @@ function AvatarWithDisplayName({
}

if (isExpenseReport(report) && report?.ownerAccountID) {
Navigation.navigate(ROUTES.PROFILE.getRoute(report.ownerAccountID));
Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.PROFILE.getRoute(report.ownerAccountID)));
return;
}

Expand All @@ -255,7 +260,7 @@ function AvatarWithDisplayName({
if (isChatThread(report)) {
// In an ideal situation account ID won't be 0
if (actorAccountID.current && actorAccountID.current > 0) {
Navigation.navigate(ROUTES.PROFILE.getRoute(actorAccountID.current));
Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.PROFILE.getRoute(actorAccountID.current)));
return;
}
}
Expand Down
7 changes: 4 additions & 3 deletions src/components/FrozenCardHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ import useOnyx from '@hooks/useOnyx';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import DateUtils from '@libs/DateUtils';
import createDynamicRoute from '@libs/Navigation/helpers/dynamicRoutesUtils/createDynamicRoute';
import {getDisplayNameOrDefault} from '@libs/PersonalDetailsUtils';
import Navigation from '@navigation/Navigation';
import variables from '@styles/variables';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import {DYNAMIC_ROUTES} from '@src/ROUTES';
import Button from './Button';
import Text from './Text';
import TextLink from './TextLink';
Expand Down Expand Up @@ -64,7 +65,7 @@ function FrozenCardHeader({cardPreview, children, style, onUnfreezePress, onAskT
<>
{adminFrozenTextPrefix}
<TextLink
onPress={() => Navigation.navigate(ROUTES.PROFILE.getRoute(Number(frozenByAccountID), Navigation.getActiveRoute()))}
onPress={() => Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.PROFILE.getRoute(Number(frozenByAccountID))))}
style={[styles.textLabel, styles.link]}
>
{frozenByName}
Expand All @@ -79,7 +80,7 @@ function FrozenCardHeader({cardPreview, children, style, onUnfreezePress, onAskT
<>
{frozenNeedsUnfreezePrefix}
<TextLink
onPress={() => Navigation.navigate(ROUTES.PROFILE.getRoute(Number(frozenByAccountID), Navigation.getActiveRoute()))}
onPress={() => Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.PROFILE.getRoute(Number(frozenByAccountID))))}
style={[styles.textLabel, styles.link]}
>
{frozenByName}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ import type {WithCurrentUserPersonalDetailsProps} from '@components/withCurrentU
import useLocalize from '@hooks/useLocalize';
import useStyleUtils from '@hooks/useStyleUtils';
import useThemeStyles from '@hooks/useThemeStyles';
import createDynamicRoute from '@libs/Navigation/helpers/dynamicRoutesUtils/createDynamicRoute';
import Navigation from '@libs/Navigation/Navigation';
import {getAccountIDsByLogins, getDisplayNameOrDefault, getShortMentionIfFound} from '@libs/PersonalDetailsUtils';
import CONST from '@src/CONST';
import ROUTES from '@src/ROUTES';
import {DYNAMIC_ROUTES} from '@src/ROUTES';
import type {Route} from '@src/ROUTES';
import asMutable from '@src/types/utils/asMutable';
import {isEmptyObject} from '@src/types/utils/EmptyObject';
Expand All @@ -45,7 +46,7 @@ function MentionUserRenderer({style, tnode, TDefaultRenderer, currentUserPersona
accountID = parseInt(htmlAttribAccountID, 10);
mentionDisplayText = formatPhoneNumber(user?.login ?? '') || getDisplayNameOrDefault(user);
mentionDisplayText = getShortMentionIfFound(mentionDisplayText, htmlAttributeAccountID, currentUserPersonalDetails, user?.login ?? '') ?? '';
navigationRoute = ROUTES.PROFILE.getRoute(accountID, Navigation.getReportRHPActiveRoute());
navigationRoute = createDynamicRoute(DYNAMIC_ROUTES.PROFILE.getRoute(accountID), Navigation.getReportRHPActiveRoute());
} else if ('data' in tnode && !isEmptyObject(tnode.data)) {
tnodeClone = cloneDeep(tnode);
// We need to remove the LTR unicode and leading @ from data as it is not part of the login
Expand All @@ -57,13 +58,13 @@ function MentionUserRenderer({style, tnode, TDefaultRenderer, currentUserPersona
);

accountID = getAccountIDsByLogins([mentionDisplayText])?.at(0) ?? -1;
navigationRoute = ROUTES.PROFILE.getRoute(accountID, Navigation.getReportRHPActiveRoute(), mentionDisplayText);
navigationRoute = createDynamicRoute(DYNAMIC_ROUTES.PROFILE.getRoute(accountID, mentionDisplayText), Navigation.getReportRHPActiveRoute());
mentionDisplayText = Str.removeSMSDomain(mentionDisplayText);
} else if (!isEmpty(htmlAttribAccountID)) {
// accountID not found in personal details and mention data not provided
accountID = parseInt(htmlAttribAccountID, 10);
mentionDisplayText = getDisplayNameOrDefault();
navigationRoute = ROUTES.PROFILE.getRoute(accountID, Navigation.getReportRHPActiveRoute());
navigationRoute = createDynamicRoute(DYNAMIC_ROUTES.PROFILE.getRoute(accountID), Navigation.getReportRHPActiveRoute());
} else {
// If neither an account ID or email is provided, don't render anything
return null;
Expand All @@ -86,10 +87,10 @@ function MentionUserRenderer({style, tnode, TDefaultRenderer, currentUserPersona
onPress={(event) => {
event.preventDefault();
if (!isEmpty(htmlAttribAccountID)) {
Navigation.navigate(ROUTES.PROFILE.getRoute(parseInt(htmlAttribAccountID, 10), Navigation.getReportRHPActiveRoute()));
Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.PROFILE.getRoute(parseInt(htmlAttribAccountID, 10)), Navigation.getReportRHPActiveRoute()));
return;
}
Navigation.navigate(ROUTES.PROFILE.getRoute(accountID, Navigation.getReportRHPActiveRoute(), mentionDisplayText));
Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.PROFILE.getRoute(accountID, mentionDisplayText), Navigation.getReportRHPActiveRoute()));
}}
role={CONST.ROLE.LINK}
accessibilityLabel={`/${navigationRoute}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import {TNodeChildrenRenderer} from 'react-native-render-html';
import Text from '@components/Text';
import UserDetailsTooltip from '@components/UserDetailsTooltip';
import useThemeStyles from '@hooks/useThemeStyles';
import createDynamicRoute from '@libs/Navigation/helpers/dynamicRoutesUtils/createDynamicRoute';
import Navigation from '@libs/Navigation/Navigation';
import {isOptimisticPersonalDetail} from '@libs/ReportUtils';
import CONST from '@src/CONST';
import ROUTES from '@src/ROUTES';
import {DYNAMIC_ROUTES} from '@src/ROUTES';

type UserDetailsRendererProps = CustomRendererProps<TText | TPhrasing>;

Expand Down Expand Up @@ -35,7 +36,7 @@ function UserDetailsRenderer({tnode, ...defaultRendererProps}: UserDetailsRender
<Text
{...defaultRendererProps}
style={[styles.textStrong]}
onPress={() => Navigation.navigate(ROUTES.PROFILE.getRoute(accountID, Navigation.getActiveRoute()))}
onPress={() => Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.PROFILE.getRoute(accountID)))}
suppressHighlighting
role={CONST.ROLE.LINK}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ function MoneyRequestReportActionsList({onLayout}: MoneyRequestReportListProps)
hasNewestReportAction,
setIsFloatingMessageCounterVisible,
scrollToEnd: reportScrollManager.scrollToEnd,
resetKey: report.reportID,
resetKey: report?.reportID ?? reportIDFromRoute ?? '',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason we had to change this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While testing, I found an app crash caused by resetKey being undefined due to report?.reportID. We should add a fallback: if report?.reportID is unavailable, then use reportIDFromRoute or '' like

reportID: report?.reportID ?? reportIDFromRoute ?? '',

});

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails'
import useThemeStyles from '@hooks/useThemeStyles';
import {clearReportFieldKeyErrors} from '@libs/actions/Report';
import {resolveReportFieldValue} from '@libs/Formula';
import createDynamicRoute from '@libs/Navigation/helpers/dynamicRoutesUtils/createDynamicRoute';
import Navigation from '@libs/Navigation/Navigation';
import {
getFieldViolation,
Expand All @@ -23,7 +24,7 @@ import {
} from '@libs/ReportUtils';
import type {ThemeStyles} from '@styles/index';
import CONST from '@src/CONST';
import ROUTES from '@src/ROUTES';
import {DYNAMIC_ROUTES} from '@src/ROUTES';
import type {Policy, PolicyReportField, Report, ReportViolationName} from '@src/types/onyx';
import type {PendingAction} from '@src/types/onyx/OnyxCommon';

Expand Down Expand Up @@ -62,7 +63,11 @@ function ReportFieldView(reportField: EnrichedPolicyReportField, report: OnyxEnt
description={Str.UCFirst(reportField.name)}
title={reportField.fieldValue}
onPress={() => {
Navigation.navigate(ROUTES.EDIT_REPORT_FIELD_REQUEST.getRoute(report?.reportID, report?.policyID, reportField.fieldID, Navigation.getActiveRoute()));
if (!report?.policyID) {
return;
}

Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.EDIT_REPORT_FIELD.getRoute(report.policyID, reportField.fieldID)));
}}
shouldShowRightIcon={!reportField.isFieldDisabled}
wrapperStyle={[styles.pv2, styles.taskDescriptionMenuItem]}
Expand Down
6 changes: 4 additions & 2 deletions src/components/ReportActionAvatars/ReportActionAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ import useTheme from '@hooks/useTheme';
import useThemeIllustrations from '@hooks/useThemeIllustrations';
import useThemeStyles from '@hooks/useThemeStyles';
import {getCardFeedIcon} from '@libs/CardUtils';
import createDynamicRoute from '@libs/Navigation/helpers/dynamicRoutesUtils/createDynamicRoute';
import {getUserDetailTooltipText, sortIconsByName} from '@libs/ReportUtils';
import type {AvatarSource} from '@libs/UserAvatarUtils';
import Navigation from '@navigation/Navigation';
import variables from '@styles/variables';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import ROUTES, {DYNAMIC_ROUTES} from '@src/ROUTES';
import type {CardFeed} from '@src/types/onyx/CardFeeds';
import type {Icon as IconType} from '@src/types/onyx/OnyxCommon';

Expand Down Expand Up @@ -85,7 +86,8 @@ function ProfileAvatar(props: Parameters<typeof Avatar>[0] & {useProfileNavigati
}
return Navigation.navigate(ROUTES.WORKSPACE_AVATAR.getRoute(String(avatarID), firstLetter));
}
return Navigation.navigate(ROUTES.PROFILE_AVATAR.getRoute(Number(avatarID), Navigation.getActiveRoute()));

return Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.PROFILE_AVATAR.getRoute(Number(avatarID))));
};

return (
Expand Down
Loading
Loading