refactor getReasonAndReportActionThatHasRedBrickRoad to use isOffline from useNetwork#88343
Conversation
|
@DylanDylann Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
| {currentValue, sourceValues}, | ||
| ) => { | ||
| // Read the in-memory offline state directly (NETWORK is a dependency so recompute still fires when it changes). | ||
| const isOffline = getIsOffline(); |
There was a problem hiding this comment.
Why do we need to use getIsOffline function? Could we use this value directly here because it has already been added to dependencies
There was a problem hiding this comment.
No, we can't use isOffline directly from network onyx state since it's derived from multiple variables. We also use it in useNetwork then I think it's fine to use it here
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-04-23.at.20.53.40.mov |
|
@DylanDylann All yours |
|
🚧 @roryabraham has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.3.62-0 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Fixed Issues
$ #66407
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-04-20.at.23.40.43.mov