I am trying to ensure that user will always be sent to login page if they are not currently logged in. I'm using Redux to store the current user id, so that's not the problem. The main problem is that no matter what checks I put in the router file, the app shows all the pages when I navigate to them. Any help would be greatly appreciated.
<Router sceneStyle={{ paddingTop: 65 }}>
<Scene
key="splash"
component={Splash}
title="App"
timeout={500}
nextScene={'main'}
initial
/>
<Scene key="auth" >
<Scene key="login" component={LoginForm} title="Please Login" />
</Scene>
<Scene key="profile">
<Scene key="profilePage" component={ProfilePage} title="My Profile" />
</Scene>
<Scene key="main" >
<Scene
key="subscribedList"
component={SubscribedList}
title="Choose A List"
/>
<Scene
key="itemsList"
component={ItemsList}
onBack={() => Actions.subscribedList()}
/>
<Scene
key="createList"
component={CreateList}
title="Create A List"
/>
<Scene
key="createItem"
component={CreateItem}
title="Create Item"
/>
<Scene
key="compareItem"
component={CompareItem}
title="Found Item"
/>
</Scene>
</Router>