import React, { Component } from 'react' import { Row, Col, Divider } from 'antd' import { isEqual } from 'lodash' import store from 'store' import Components from 'components' import moment from 'moment' import './index.less' const { getState, subscribe } = store const { Container, Image, AntIcon } = Components const storePath = 'user' export default class index extends Component { state = { [storePath]: getState(storePath) } constructor(props) { super(props) this.unsubscribe = subscribe(storePath, () => { this.setState(getState(storePath)) }) } shouldComponentUpdate(props, state) { return !isEqual(this.state, state) } componentWillUnmount() { this.unsubscribe() } render() { return ( <>