From e2f9d1920e2b54a230280e5b33be420bdf1e6ed2 Mon Sep 17 00:00:00 2001 From: ErikSin <67773827+ErikSin@users.noreply.github.com> Date: Thu, 25 Apr 2024 10:42:58 -0700 Subject: [PATCH 1/5] chore: replace placeholder buttons (#292) * chore: fixed placeholder buttons * chore: translations * chore:translations * chore: reset nav state after project invite --- messages/en.json | 3 +++ .../CreateProject/ProjectCreated.tsx | 20 +++++++++++++++- .../ProjectInviteBottomSheet.tsx | 23 ++++++++++++++++++- 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/messages/en.json b/messages/en.json index 7cb3f521e..f242b7401 100644 --- a/messages/en.json +++ b/messages/en.json @@ -713,6 +713,9 @@ "sharedComponents.ProjectInviteBottomSheet.goToMap": { "message": "Go To Map" }, + "sharedComponents.ProjectInviteBottomSheet.goToSync": { + "message": "Go To Sync" + }, "sharedComponents.ProjectInviteBottomSheet.invitedToJoin": { "message": "You've been invited to join {projName}" }, diff --git a/src/frontend/screens/Settings/CreateOrJoinProject/CreateProject/ProjectCreated.tsx b/src/frontend/screens/Settings/CreateOrJoinProject/CreateProject/ProjectCreated.tsx index fc35536c3..58b5ff3f0 100644 --- a/src/frontend/screens/Settings/CreateOrJoinProject/CreateProject/ProjectCreated.tsx +++ b/src/frontend/screens/Settings/CreateOrJoinProject/CreateProject/ProjectCreated.tsx @@ -49,6 +49,24 @@ export const ProjectCreated = ({ ); } + //This resets the navigation so the user cannot press back and return to this screen + function handleGoToInviteScreen() { + navigation.dispatch(state => { + const index = state.routes.findIndex(r => r.name === 'Settings'); + const routes = [ + ...state.routes.slice(0, index + 1), + {name: 'YourTeam'}, + {name: 'SelectDevice'}, + ]; + + return CommonActions.reset({ + ...state, + routes, + index: routes.length - 1, + }); + }); + } + return ( @@ -64,7 +82,7 @@ export const ProjectCreated = ({ -