Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
))}
)
}
}
// eslint-disable-next-line no-unused-vars
export const mapStateToOptions = (state, ownProps) => {
return {
viewModelName: 'shoppingList',
aggregateIds: ['shopping-list-1']
}
}
export default connectViewModel(mapStateToOptions)(ShoppingList)
{errors[errors.length - 1].message}
)}
)
}
}
const mapStateToOptions = (_, { clientId }) => {
return {
viewModelName: 'error',
aggregateIds: [clientId]
}
}
export default connectViewModel(mapStateToOptions)(UsersInput)
viewModelName,
aggregateIds: [aggregateId]
}
}
const mapStateToProps = (state, ownProps) => {
return {
aggregateId: ownProps.match.params.id,
todos: ownProps.data
}
}
const mapDispatchToProps = (dispatch, { aggregateActions }) =>
bindActionCreators(aggregateActions, dispatch)
export default connectViewModel(mapStateToOptions)(
connect(
mapStateToProps,
mapDispatchToProps
)(Todos)
)
return {
aggregateId
}
}
export const mapDispatchToProps = (dispatch, { aggregateActions }) =>
bindActionCreators(
{
...aggregateActions,
replaceUrl: routerActions.replace
},
dispatch
)
export default connectViewModel(mapStateToOptions)(
connect(
mapStateToProps,
mapDispatchToProps
)(ShoppingList)
)
})
export const mapDispatchToProps = (dispatch, { aggregateActions }) =>
bindActionCreators(
{
commentStory: ({ aggregateId, parentId, text }) =>
aggregateActions.commentStory(aggregateId, {
text,
parentId,
commentId: uuid.v4()
})
},
dispatch
)
export default connectViewModel(mapStateToOptions)(
connect(
mapStateToProps,
mapDispatchToProps
)(CommentById)
)
export const mapStateToOptions = (state, ownProps) => {
return {
viewModelName: 'ShoppingList',
aggregateIds: ['shopping-list-1']
}
}
export const mapDispatchToProps = (dispatch, { aggregateActions }) =>
bindActionCreators(
{
...aggregateActions
},
dispatch
)
export default connectViewModel(mapStateToOptions)(
connect(
null,
mapDispatchToProps
)(ShoppingList)
)
return {
aggregateId
}
}
export const mapDispatchToProps = (dispatch, { aggregateActions }) =>
bindActionCreators(
{
...aggregateActions,
replaceUrl: routerActions.replace
},
dispatch
)
export default connectViewModel(mapStateToOptions)(
connect(
mapStateToProps,
mapDispatchToProps
)(ShoppingList)
)
}
export const mapStateToProps = (state, ownProps) => {
const aggregateId = ownProps.navigation.state.params.id
return {
jwt: state.jwt,
aggregateId
}
}
export const mapDispatchToProps = dispatch =>
bindActionCreators(aggregateActions, dispatch)
export default requiredAuth(
connectViewModel(mapStateToOptions)(
connect(
mapStateToProps,
mapDispatchToProps
)(ShoppingList)
)
)
return {
aggregateId
}
}
export const mapDispatchToProps = (dispatch, { aggregateActions }) =>
bindActionCreators(
{
...aggregateActions,
replaceUrl: routerActions.replace
},
dispatch
)
export default connectViewModel(mapStateToOptions)(
connect(
mapStateToProps,
mapDispatchToProps
)(ShoppingList)
)
export const mapDispatchToProps = (dispatch, { aggregateActions }) =>
bindActionCreators(
{
upvoteStory: aggregateActions.upvoteStory,
unvoteStory: aggregateActions.unvoteStory,
commentStory: ({ parentId, text }) =>
aggregateActions.commentStory(parentId, {
text,
parentId,
commentId: uuid()
})
},
dispatch
)
export default connectViewModel(mapStateToOptions)(
connect(
mapStateToProps,
mapDispatchToProps
)(StoryDetails)
)