Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
context,
onIncrement() {
context.dispatch(actions.counter.increment());
},
onReset() {
context.dispatch(actions.counter.reset());
},
onRandom() {
context.dispatch(actions.counter.random());
}
});
export default composeAll(
withRedux(mapStateToProps),
useDeps(depsToProps)
)(Counter);
const isWechat = user.profile.headimgurl || user.city;
const nickname = user.profile.nickname;
const avatar = isWechat ? user.profile.headimgurl : '';
onData(null, {
loggedIn: !!user,
notWechat: !isWechat,
isWechatVerified,
nickname,
avatar
});
} else {
onData(null, {loggedIn: user});
}
}
export default composeAll(
withTracker(composer),
useDeps()
)(Login);
toastr.error("活动没有找到,返回到原来页面");
browserHistory.push('/events');
}
} else {
document.title = event.title;
onData(null, { event });
}
});
onData(null, {});
};
const depsToProps = (context, actions) => ({
context
});
export default composeAll(
compose(initData),
useDeps(depsToProps)
)(Post);
const events = Collections.Events.find().fetch();
onData(null, {
events: { status: 'ready', data: events }
});
} else {
onData(null, {
events: { status: 'pending', data: [] }
});
}
};
const depsToProps = (context, actions) => ({
context
});
export default composeAll(
withTracker(subscription),
useDeps(depsToProps)
)(EventsList);
import Register from '../../components/users/register';
function composer({context}, onData) {
onData(null, {
loggedIn: !!context.Meteor.user()
});
}
const depsToProps = (context, actions) => ({
context,
dispatch: context.dispatch,
createNewUser: actions.users.createNewUser,
});
export default composeAll(
withTracker(composer),
useDeps(depsToProps)
)(Register);