Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return {
tabs: TABS,
currentPath: routerInteraction.currentPath,
};
}
function mapToFunctions(_, { phone: { routerInteraction } }) {
return {
goTo: (path) => {
if (path) {
routerInteraction.push(path);
}
},
};
}
const MainView = withPhone(
connect(
mapToProps,
mapToFunctions,
)(TabNavigationView),
);
export default MainView;
function mapToFunctions(_, { phone, phone: { routerInteraction } }) {
return {
goTo(path) {
if (path) {
if (path === '/dialer' && hasActiveCalls(phone)) {
routerInteraction.push('/calls');
} else {
routerInteraction.push(path);
}
}
},
};
}
const MainView = withPhone(
connect(
mapToProps,
mapToFunctions,
)(TabNavigationView),
);
export default MainView;