Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: WS switcher and LHN are not reset to Expensify after leaving #45285

Merged
merged 14 commits into from
Jul 31, 2024
Prev Previous commit
Next Next commit
Fix: Lint
  • Loading branch information
truph01 committed Jul 24, 2024
commit 9253a2c1bb509952299ece6792da01394e44e70c
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@
const [selectedPolicy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${activeWorkspaceID ?? -1}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const [selectedPolicy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${activeWorkspaceID ?? -1}`);
const [activeWorkspace] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${activeWorkspaceID ?? -1}`);

NAB. Naming consistency


useEffect(() => {
if (selectedPolicy || activeWorkspaceID === undefined || didResetActiveWorkspaceIDRef.current) {
if (selectedPolicy || activeWorkspaceID === undefined || !!didResetActiveWorkspaceIDRef.current) {

Check failure on line 40 in src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.tsx

GitHub Actions / Run ESLint

Prefer using nullish coalescing operator (`??`) instead of a logical or (`||`), as it is a safer operator
return;
}

Loading