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

Double navBar on nested Scenes #2077

Closed
psycura opened this issue Jul 20, 2017 · 7 comments
Closed

Double navBar on nested Scenes #2077

psycura opened this issue Jul 20, 2017 · 7 comments

Comments

@psycura
Copy link

psycura commented Jul 20, 2017

Hello, and thank you for great work.

My version 4.0.0-beta.12:

My router is:

<Router>
            <Scene key="root">
                <Scene key="auth">
                    <Scene key="login" component={LoginForm} title="Please Login"/>
                </Scene>
                <Scene key="main">
                    <Scene key="employeeList" component={EmployeeList} title="Employees"/>
                </Scene>
            </Scene>
 </Router>

and in emulator i see this issue:
2017-07-20_1753

as you can see i have 2 headers - i suppose - one for "auth" and one for "login".
How can i disable one of them?
if i put hideNavBar to the parent or to the child - as result i dont see navBar at all.

And another question - if i want after login redirect user to the "employeeList", and i dont want that user will have BACK button at the navigation - how i can achieve this?

Thank you

@luco
Copy link
Contributor

luco commented Jul 20, 2017

Set hideNavBar on root.

@psycura
Copy link
Author

psycura commented Jul 20, 2017

Ohh, thanks ))
what about 2nd question?

@psycura
Copy link
Author

psycura commented Jul 20, 2017

Oh, sorry, now the back button is gone.
Issue closed

@psycura psycura closed this as completed Jul 20, 2017
@xuananpham93
Copy link

I love you #luco

@mukunzidd
Copy link

I love u @luco u saved my ass. Stephen Grider too? @aksonov

@silasakk
Copy link

thanks @luco

@hastishb
Copy link

hastishb commented Jun 10, 2018

Hey!
I'm also going through Stephen Grider's tutorials and I just had this problem. the hidNavBar thing didn't work for me. But I realized that sceneStyle={{ paddingTop: 65 }} on the Router caused it. without it there's no problem. I guess you should do the styling for the nested scenes only. Setting it in the Router also applies it to root and it doubles.
I notice that you didn't use the styling in your router but there is one in Stephen's example.
thought it could help others.

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

6 participants