From 3dab9c58d0ecbe3aa03dac1585051c3fdbc02c44 Mon Sep 17 00:00:00 2001 From: daledah Date: Wed, 9 Apr 2025 13:44:55 +0700 Subject: [PATCH 1/3] fix: correct go back behaviour for workspace list page --- src/pages/workspace/WorkspaceNewRoomPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/WorkspaceNewRoomPage.tsx b/src/pages/workspace/WorkspaceNewRoomPage.tsx index 686e712c8881..d8f13592e285 100644 --- a/src/pages/workspace/WorkspaceNewRoomPage.tsx +++ b/src/pages/workspace/WorkspaceNewRoomPage.tsx @@ -228,7 +228,7 @@ function WorkspaceNewRoomPage() { success large text={translate('footer.learnMore')} - onPress={() => Navigation.navigate(ROUTES.SETTINGS_WORKSPACES.route)} + onPress={() => Navigation.navigate(ROUTES.SETTINGS_WORKSPACES.getRoute(Navigation.getActiveRoute()))} style={[styles.mh5, styles.mb5]} /> {isSmallScreenWidth && ( From 12c999307641eb2fab3e87867d0dafcab2fe3f6f Mon Sep 17 00:00:00 2001 From: daledah Date: Thu, 17 Apr 2025 15:28:06 +0700 Subject: [PATCH 2/3] fix: lint --- src/pages/workspace/WorkspaceNewRoomPage.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/workspace/WorkspaceNewRoomPage.tsx b/src/pages/workspace/WorkspaceNewRoomPage.tsx index 8c56b9196744..a5a655b3a813 100644 --- a/src/pages/workspace/WorkspaceNewRoomPage.tsx +++ b/src/pages/workspace/WorkspaceNewRoomPage.tsx @@ -41,11 +41,11 @@ function WorkspaceNewRoomPage() { const isFocused = useIsFocused(); const {translate} = useLocalize(); const {isOffline} = useNetwork(); - const [policies] = useOnyx(ONYXKEYS.COLLECTION.POLICY); - const [reports] = useOnyx(ONYXKEYS.COLLECTION.REPORT); - const [formState] = useOnyx(ONYXKEYS.FORMS.NEW_ROOM_FORM, {initWithStoredValues: false}); - const [session] = useOnyx(ONYXKEYS.SESSION); - const [activePolicyID] = useOnyx(ONYXKEYS.NVP_ACTIVE_POLICY_ID); + const [policies] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {canBeMissing: false}); + const [reports] = useOnyx(ONYXKEYS.COLLECTION.REPORT, {canBeMissing: false}); + const [formState] = useOnyx(ONYXKEYS.FORMS.NEW_ROOM_FORM, {initWithStoredValues: false, canBeMissing: true}); + const [session] = useOnyx(ONYXKEYS.SESSION, {canBeMissing: false}); + const [activePolicyID] = useOnyx(ONYXKEYS.NVP_ACTIVE_POLICY_ID, {canBeMissing: true}); // We need to use isSmallScreenWidth instead of shouldUseNarrowLayout to show offline indicator on small screen only // eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth const {top} = useSafeAreaInsets(); From b453f0ba6c3b706c8545785685d69fe67758cda8 Mon Sep 17 00:00:00 2001 From: daledah Date: Thu, 17 Apr 2025 19:02:30 +0700 Subject: [PATCH 3/3] fix: update canBeMissing value --- src/pages/workspace/WorkspaceNewRoomPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/workspace/WorkspaceNewRoomPage.tsx b/src/pages/workspace/WorkspaceNewRoomPage.tsx index a5a655b3a813..a1091ad5585a 100644 --- a/src/pages/workspace/WorkspaceNewRoomPage.tsx +++ b/src/pages/workspace/WorkspaceNewRoomPage.tsx @@ -43,9 +43,9 @@ function WorkspaceNewRoomPage() { const {isOffline} = useNetwork(); const [policies] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {canBeMissing: false}); const [reports] = useOnyx(ONYXKEYS.COLLECTION.REPORT, {canBeMissing: false}); - const [formState] = useOnyx(ONYXKEYS.FORMS.NEW_ROOM_FORM, {initWithStoredValues: false, canBeMissing: true}); + const [formState] = useOnyx(ONYXKEYS.FORMS.NEW_ROOM_FORM, {initWithStoredValues: false, canBeMissing: false}); const [session] = useOnyx(ONYXKEYS.SESSION, {canBeMissing: false}); - const [activePolicyID] = useOnyx(ONYXKEYS.NVP_ACTIVE_POLICY_ID, {canBeMissing: true}); + const [activePolicyID] = useOnyx(ONYXKEYS.NVP_ACTIVE_POLICY_ID, {canBeMissing: false}); // We need to use isSmallScreenWidth instead of shouldUseNarrowLayout to show offline indicator on small screen only // eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth const {top} = useSafeAreaInsets();