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

Simplify opening app check for exisiting observation #1004

Open
4 tasks
ErikSin opened this issue Feb 26, 2025 · 0 comments
Open
4 tasks

Simplify opening app check for exisiting observation #1004

ErikSin opened this issue Feb 26, 2025 · 0 comments
Assignees

Comments

@ErikSin
Copy link
Contributor

ErikSin commented Feb 26, 2025

Currently when a user opens the app we check for the existence of an observation in persisted state. If an observation exists, we use getInitailRouteName to navigate the user of the Observation Create/Edit Screen.

Due to this, we hve to derive the navigation stack to have the home screen in it so the user can go back to the home screen.

To simplify this, we can just check for the existence of an observation in the home screen. If there is an observation, then navigate to the Observation Create/Edit Screen.

To Do:

  • Add useEffect to home (Map) Screen
  • add appropriate logic fromgetInitialRouteName into this useEffect
  • remove initialRouteName from RootStackNavigator (the onboarding screen are conditionally rendered anyways)
  • remove the derived navigation states
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants