Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.setState({
loggingIn: true,
loginMessage: 'Retrieving data from cache...'
});
//set session first as most of others stores needs fields from it
await session.retrieveSessionFromCache();
await Promise.all([
calendar.retrieveCalendarFromCache(),
projects.retrieveProjectsFromCache(),
marks.retrieveMarksFromCache(),
//ranking.selfRankPosition({ fromCache: true }),
]);
Actions.home();
} catch (e) {
console.error(e);
}
}
<button> Actions.home({ homeProp: 'Test of prop refresh!' })}>Replace screen</button>
<button>Back</button>
handleFinish = () => {
const { username, password } = this.props.details
this.props.dispatch(loginWithPassword(username, password))
Actions.home()
}
handleToHome() {
Actions.home({type: ActionConst.RESET, disableInteractionCheck: true})
}
onPress={() => Actions.home(this.props)}
>
<button> Actions.home()}>Mask</button>
this.state.dataRecord.whenReady(() => {
if (!this.state.profileRecord.get("onboardingComplete")) {
Actions.reset('onboard', {ds: this.props.ds, username: this.state.username, profileRecord: this.state.profileRecord, dataRecord: this.state.dataRecord, configurePush: this.props.configurePush});
} else {
var configurePush = this.props.configurePush.bind(this)
configurePush()
Actions.reset('drawer', {ds: this.props.ds, username: this.state.username, profileRecord: this.state.profileRecord, dataRecord: this.state.dataRecord, configurePush: this.props.configurePush});
Actions.home({ds: this.props.ds, username: this.state.username, profileRecord: this.state.profileRecord, dataRecord: this.state.dataRecord, configurePush: this.props.configurePush});
}
})
})
context.loginWithPassword(username, password, null, null, (error, account) => {
dispatch(closeLoading())
if (error) {
dispatch(openErrorModal(error.message))
}
if (!error) {
global.localStorage.setItem('lastUser', username)
dispatch(userLogin(account))
Actions.home()
}
})
})