import { connect } from 'react-redux';
import paragraph from 'store/paragraph';
import Paragraph, { ParagraphProps } from './Paragraph';

const mapStateToProps = (state: Record<string, any>): Record<string, any> => ({
  user: state.paragraph.user,
});

const mapDispatchToProps = {
  me: paragraph.actions.me.request.action,
};

const Wrapped = connect<ParagraphProps>(mapStateToProps, mapDispatchToProps)(Paragraph);

export default Wrapped;
