Added in support for automatically going to the "BrandSelector" page if there is no brand found on sign in.

This commit is contained in:
Dan Lefrancois
2021-10-28 09:11:09 -07:00
parent 378d3b6200
commit 419158efeb

View File

@@ -17,6 +17,13 @@ export default class SignIn extends Component {
this.passwordRef = React.createRef();
}
componentDidMount() {
// If the brand is not selected, then resort back to the brand selector
if (useStore.getState().brandInfo === null) {
this.props.navigation.replace('BrandSelector');
}
}
render() {
return (
<View style={pageStyle.container}>