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

chore: dismiss all before returning home #227

Merged
merged 4 commits into from
Dec 24, 2024
Merged

Conversation

im-adithya
Copy link
Member

@im-adithya im-adithya commented Dec 18, 2024

This removes the back button in the header, if you cancel/finish setup

Note: for some reason, this cannot be observed in Expo Go but the production build also has this issue.

Screenshots

Copy link
Contributor

@rolznz rolznz left a comment

Choose a reason for hiding this comment

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

utACK

if (router.canDismiss()) {
router.dismissAll();
}
router.navigate("/");
Copy link
Contributor

Choose a reason for hiding this comment

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

is this navigation even needed if we dismiss all the routes? shouldn't this be the default?

Copy link
Contributor

Choose a reason for hiding this comment

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

Won't this also push a route onto the stack, leaving a back button?

Copy link
Member Author

Choose a reason for hiding this comment

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

Navigate actually goes to "/" if available (which is actually the only screen in the stack after dismissAll), so it doesn't add a back button

Copy link
Member Author

Choose a reason for hiding this comment

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

is this navigation even needed if we dismiss all the routes? shouldn't this be the default?

Makes sense, removed navigation

Copy link
Contributor

@rolznz rolznz left a comment

Choose a reason for hiding this comment

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

EDIT: please check comments

@im-adithya
Copy link
Member Author

Addressed, should be good now!

@im-adithya im-adithya merged commit 58d8171 into master Dec 24, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants