prevent modal from popping up on page load
This commit is contained in:
parent
087a3e3a63
commit
79a37f367f
|
@ -50,27 +50,27 @@ class OnboardModal extends React.Component<Props, State> {
|
||||||
const { sessionStarted } = this.props;
|
const { sessionStarted } = this.props;
|
||||||
const currentSlide = Number(localStorage.getItem(ONBOARD_LOCAL_STORAGE_KEY)) || 0;
|
const currentSlide = Number(localStorage.getItem(ONBOARD_LOCAL_STORAGE_KEY)) || 0;
|
||||||
|
|
||||||
if (!sessionStarted) {
|
/* if (!sessionStarted) {
|
||||||
this.props.startOnboardSession();
|
* this.props.startOnboardSession();
|
||||||
if (currentSlide === 0) {
|
* if (currentSlide === 0) {
|
||||||
this.setState({
|
* this.setState({
|
||||||
isOpen: true
|
* isOpen: true
|
||||||
});
|
* });
|
||||||
}
|
* }
|
||||||
if (currentSlide > 0 && currentSlide < NUMBER_OF_ONBOARD_SLIDES) {
|
* if (currentSlide > 0 && currentSlide < NUMBER_OF_ONBOARD_SLIDES) {
|
||||||
this.props.resumeSlide(currentSlide);
|
* this.props.resumeSlide(currentSlide);
|
||||||
this.setState({
|
* this.setState({
|
||||||
isOpen: true
|
* isOpen: true
|
||||||
});
|
* });
|
||||||
|
|
||||||
const onboardResumeMessage = translateRaw('ONBOARD_RESUME');
|
* const onboardResumeMessage = translateRaw('ONBOARD_RESUME');
|
||||||
|
|
||||||
// Wait a sec so it doesn't get lost in the page-load
|
* // Wait a sec so it doesn't get lost in the page-load
|
||||||
setTimeout(() => {
|
* setTimeout(() => {
|
||||||
this.props.showNotification('info', onboardResumeMessage, 6000);
|
* this.props.showNotification('info', onboardResumeMessage, 6000);
|
||||||
}, 1200);
|
* }, 1200);
|
||||||
}
|
* }
|
||||||
}
|
* } */
|
||||||
}
|
}
|
||||||
|
|
||||||
public render() {
|
public render() {
|
||||||
|
|
Loading…
Reference in New Issue