Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onNavigationStateChange(navState) {
console.log("nav state change: ---> ", navState);
if (navState.url === HOME_URL || navState.url === `${HOME_URL}main/`) {
updateCSRF();
this.setState({
loggedIn: true,
});
Actions.main({ type: ActionConst.REPLACE });
}
}
navigation.state.key} />
{
console.log('Drawer closed');
}}
onEnter={() => {
console.log('Drawer opened');
}}
contentComponent={DrawerContent}
drawerImage={MenuIcon}
drawerWidth={300}
>
{/*
Meteor.loginWithPassword(email, password, (error) => {
if (error) {
dispatch(loading());
dispatch(errorLogin(error.reason));
} else {
dispatch(loading());
dispatch(userData(Meteor.user()));
Actions.home({type: ActionConst.REPLACE});
}
});
} else {
key={scenes.SCENE_FEEDBACK}
component={FeedBack}
title="ๅ้ฆ้กต้ข"
hideNavBar
/>
)
}
}
render() {
const { sceneStyle, navigationBarStyle, navigationBarTitleStyle } = styles;
return (
this.props.logout()}
rightButtonImage={imgAppAdd}
onRight={() => this.props.addProduct()}
/>
titleStyle={navigationTitleStyle}
sceneStyle={sceneStyle}
key="timer"
title="Timer"
component={Timer}
type={ActionConst.RESET}
/>
);
};
.then(user => {
dispatch(actions.receiveAuth(user));
dispatch(loaderToggle());
Actions.main({
type: ActionConst.REPLACE
});
})
.catch(error => {
import React from 'react';
import { Scene, Router, Actions, ActionConst } from 'react-native-router-flux';
import Welcome from '../layouts/welcome';
import Login from '../layouts/login';
import Signup from '../layouts/signup';
import NewPost from '../layouts/newPost';
import Feed from '../layouts/feed';
const scenes = Actions.create(
);
export default () => (
);
shadowRadius: null,
};
if (computedProps.isActive) {
style.marginTop = computedProps.hideNavBar ?
0 : Navigator.NavigationBar.Styles.General.TotalNavHeight;
style.marginBottom = computedProps.hideTabBar ? 0 : 50;
}
return style;
};
const scenes = Actions.create(
state.find.chat,
Action.dispatch('openChat')
)(Network)}/>
state.common.loading
)(Loading)}/>