/*
*
* HomePage
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { injectIntl } from 'react-intl';
import { bindActionCreators, compose } from 'redux';
import cn from 'classnames';
// Design
import EditForm from 'components/EditForm';
import HeaderNav from 'components/HeaderNav';
import List from 'components/List';
import PluginHeader from 'components/PluginHeader';
// Utils
import injectReducer from 'utils/injectReducer';
import injectSaga from 'utils/injectSaga';
// Selectors
import selectHomePage from './selectors';
// Styles
import styles from './styles.scss';
// Actions
import {
deleteData,
fetchData,
} from './actions';
import reducer from './reducer';
import saga from './saga';
export class HomePage extends React.Component {
componentDidMount() {
this.props.fetchData(this.props.match.params.settingType);
}
componentDidUpdate(prevProps) {
if (prevProps.match.params.settingType !== this.props.match.params.settingType) {
this.props.fetchData(this.props.match.params.settingType);
}
}
onButtonClick = () => this.props.history.push(`${this.props.location.pathname}/create`);
render() {
const noButtonList = this.props.match.params.settingType === 'email-templates';
const component = this.props.match.params.settingType === 'advanced-settings' ?
;
return (