import { Component } from 'react’
import { View, Text, Button, Image } from '@tarojs/components’
import { connect } from '@tarojs/redux’
import ‘./menu.less’
@connect(function (store) {
return { …store.menu }
}, function (dispatch) {
return {
showMenu() {
dispatch(showDrawer())
},
hideDrawer() {
dispatch(hideDrawer())
},
changeCata(cata) {
dispatch(changeCata(cata))
}
}
})
class Menu extends Component {
componentWillReceiveProps(nextProps) {
console.log(this.props, nextProps)
}
componentWillUnmount() {
}
componentDidMount() {
}
componentDidShow() { }
componentDidHide() { }
render() {
return (
<Image className=‘image left’ src={require(’…/…/assets/img/cata.png’)} />
{this.props.currentCata.value}
<Image className=‘image right’ src={require(’…/…/assets/img/login.png’)} />
)
}
}
export default Menu