Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onConfirm = () => {
this.props.setScreenName('RatingSystemScreen');
Navigation.setStackRoot(this.props.componentId, {
component: {
name: Screens.ONBOARDING_RATING_SYSTEM,
},
});
};
handleBackPress = () => {
const { theme: { bar, body } } = this.props;
Navigation.setStackRoot('appStack', {
component: {
name: 'home',
options: {
animations: {
setStackRoot: {
enable: false,
},
},
layout: {
backgroundColor: body.bg,
orientation: ['portrait'],
},
topBar: {
visible: false,
drawBehind: true,
elevation: 0,
Navigation.setStackRoot(componentId, {
component: {
name: 'ForestWatcher.Dashboard'
}
});
}
} else if (actionsPending === 0) {
setAppSynced(true);
} else {
syncApp();
if (!this.syncModalOpen) {
this.openModal();
}
}
} else {
Navigation.setStackRoot(componentId, {
component: {
name: 'ForestWatcher.Walkthrough'
}
});
}
}
const setStackRoot = (selfOrCompId, root) => Navigation.setStackRoot(compId(selfOrCompId), root);
navigateToRegistration = () => {
Navigation.setStackRoot(this.props.componentId, {
component: { name: Screens.AUTH_REGISTRATION },
});
}
resetTo(params) {
Navigation.setStackRoot(this.id, layoutConverter.convertComponent(params));
},
handleDeepLink({ link, payload }){
goToLogin = debounceUI(() => {
Navigation.setStackRoot(this.props.componentId, {
component: {
name: 'ForestWatcher.Login',
passProps: {
goBackDisabled: true
},
options: {
topBar: {
title: {
text: i18n.t('commonText.setup')
}
}
}
}
});
});
onWeekPress() {
this.hideMenu();
this.setState({ selected: 0 });
Navigation.setStackRoot('CENTER', {
component: {
name: WEEK,
},
});
}
() =>
Navigation.setStackRoot('appStack', {
component: {
name: nextScreen,
id: nextScreen,
options: merge({}, options, getDefaultOptions(nextScreen)),
},
}),
delay,
setStackRoot(name, props) {
//fix for RNN, it ignore global settings on iOS
const { animations } = baseStyle()
if (Array.isArray(props))
props[0].component.options = {
...props[0].component.options||{},
animations
}
else
props.component.options = {
...props.component.options||{},
animations
}
return Navigation.setStackRoot(name, props)
},