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

How to block drawer in login page #2411

Closed
pedrogoiania opened this issue Sep 20, 2017 · 1 comment
Closed

How to block drawer in login page #2411

pedrogoiania opened this issue Sep 20, 2017 · 1 comment

Comments

@pedrogoiania
Copy link

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.0-beta.21 (v3 is not supported)
  • react-native v0.48.3

Expected behaviour

<Router>
    <Drawer hideNavBar key="drawer" contentComponent={SideMenuComponent} >
        <Scene key='root' >
            <Stack hideNavBar >
                <Scene key='formLogin' initial='true' component={FormLogin} title="Login" />
                <Scene key='formCadastro' component={FormCadastro} title="Esqueci minha senha" />
            </Stack>
            <Scene key='historicoAtividade' component={HistoricoAtividade} title="Histórico da Atividade" hideNavBar={false} />    
            <Scene key='sobre' component={Sobre} title="Sobre" hideNavBar={false} />
            <Scene 
                key='linhaDoTempo' component={LinhaDoTempo} title="Linha do tempo" hideNavBar={false} type='replace' 
                left={
                    <Button transparent onPress={() => { this.handleDrawer(); }} >
                        <RNIcon ios='ios-close' android='md-menu' style={{ fontSize: 27, color: 'black' }} /> 
                    </Button> 
                }
            />
            <Scene
                back    
                key='criarAtividade' 
                component={CriarAtividade} 
                title='Nova Solicitação'
                right={
                    <View style={{ flexDirection: 'row' }}>
                        <Button transparent onPress={() => { alert('Anexar arquivo'); }} >
                            <Icon name='paperclip' size={27} color='black' /> 
                        </Button>
                        <Button transparent onPress={() => { alert('Abrir camera'); }} >
                            <RNIcon ios='ios-camera' android='md-camera' style={{ fontSize: 27, color: 'black' }} /> 
                        </Button>
                        <Button transparent onPress={() => { this.props.criarAtividade(); }} >
                            <RNIcon ios='ios-paperplane' android='md-send' style={{ fontSize: 27, color: 'black' }} /> 
                        </Button>
                    </View>
                }
            />
        </Scene>
    </Drawer>
</Router>

Actual behaviour

Steps to reproduce

For non-obvious bugs, please fork this component, modify Example project to reproduce your issue and include link here.
1.
2.
3.

@mcabs3
Copy link
Collaborator

mcabs3 commented Sep 21, 2017

@pedrogyn you should not make the drawer your outer most component, instead make a root scene as normal and have a login process, once completed you can navigate to the drawer scene and be "authenticated"

@mcabs3 mcabs3 closed this as completed Sep 21, 2017
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