Skip to content

[BT-150] Migrate Settings - Profile (Part 1) #83361

@mjasikowski

Description

@mjasikowski

Description

Current State:

  • 4 routes in Settings Profile section use backTo parameter
  • These routes handle profile and address settings

Implementation:

  • Replace getRoute(..., backTo) with createDynamicRoute()
  • Add source screens to entryScreens array for each route
  • Remove backTo parameter from route definitions
  • Test forward/back navigation

Scope

Routes (4):

Route Constant Path
SETTINGS_PROFILE settings/profile
SETTINGS_ADDRESS_COUNTRY settings/profile/address/country
SETTINGS_ADDRESS_STATE settings/profile/address/state
SETTINGS_CONTACT_METHODS settings/profile/contact-methods

Usages

SETTINGS_PROFILE:

  • src/pages/settings/InitialSettingsPage.tsx:225
  • src/pages/ProfilePage.tsx:258

SETTINGS_ADDRESS_COUNTRY:

  • src/components/CountrySelector.tsx:83

SETTINGS_ADDRESS_STATE:

  • src/components/StateSelector.tsx (search for usage)

SETTINGS_CONTACT_METHODS:

  • src/pages/domain/DomainResetPage.tsx:106
  • src/libs/actions/User.ts:268,1277
  • src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx:113
  • src/pages/settings/Profile/Contacts/NewContactMethodConfirmMagicCodePage.tsx:45
  • src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx:155,193,194,306,328
  • src/pages/TeachersUnite/ImTeacherUpdateEmailPage.tsx:22,49
  • src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx:116
  • src/components/BookTravelButton.tsx:57

Files to modify:

  • src/ROUTES.ts - Update route definitions
  • src/libs/Navigation/types.ts - Remove backTo from params
  • Components listed above

Migration Progress

  • SETTINGS_PROFILE
  • SETTINGS_ADDRESS_COUNTRY
  • SETTINGS_ADDRESS_STATE
  • SETTINGS_CONTACT_METHODS
Issue OwnerCurrent Issue Owner: @huult
Issue OwnerCurrent Issue Owner: @mananjadhav

Metadata

Metadata

Labels

InternalRequires API changes or must be handled by Expensify staffMonthlyKSv2ReviewingHas a PR in review

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions