539 lines
16 KiB
JavaScript
Raw Normal View History

2018-02-20 11:34:15 +01:00
/**
*
* ListPage
*
*/
import React from 'react';
2018-02-20 14:25:45 +01:00
import PropTypes from 'prop-types';
2018-02-20 11:34:15 +01:00
import { connect } from 'react-redux';
import { bindActionCreators, compose } from 'redux';
import { createStructuredSelector } from 'reselect';
2018-02-20 19:20:31 +01:00
import { capitalize, get, isUndefined, map, toInteger } from 'lodash';
2018-02-20 11:53:18 +01:00
import cn from 'classnames';
2018-02-20 11:34:15 +01:00
2018-02-20 15:51:20 +01:00
// App selectors
2018-02-20 16:58:05 +01:00
import { makeSelectModels, makeSelectSchema } from 'containers/App/selectors';
2018-02-20 15:51:20 +01:00
2018-02-20 11:53:18 +01:00
// You can find these components in either
// ./node_modules/strapi-helper-plugin/lib/src
// or strapi/packages/strapi-helper-plugin/lib/src
2018-02-20 19:20:31 +01:00
import PageFooter from 'components/PageFooter';
2018-02-20 11:53:18 +01:00
import PluginHeader from 'components/PluginHeader';
2018-06-05 19:03:59 +02:00
import PopUpWarning from 'components/PopUpWarning';
2018-02-20 11:34:15 +01:00
2018-02-20 16:58:05 +01:00
// Components from the plugin itself
2018-05-15 17:01:47 +02:00
import AddFilterCTA from 'components/AddFilterCTA';
import FiltersPickWrapper from 'components/FiltersPickWrapper/Loadable';
2018-05-22 10:19:16 +02:00
import Filter from 'components/Filter/Loadable';
2018-06-06 18:51:24 +02:00
import Search from 'components/Search';
2018-02-20 16:58:05 +01:00
import Table from 'components/Table';
2018-02-20 11:34:15 +01:00
// Utils located in `strapi/packages/strapi-helper-plugin/lib/src/utils`;
2018-02-20 14:25:45 +01:00
import getQueryParameters from 'utils/getQueryParameters';
2018-02-20 11:34:15 +01:00
import injectReducer from 'utils/injectReducer';
import injectSaga from 'utils/injectSaga';
2018-02-20 14:25:45 +01:00
import Div from './Div';
2018-05-18 16:46:13 +02:00
import {
addFilter,
changeParams,
deleteData,
2018-06-05 14:20:13 +02:00
deleteSeveralData,
2018-05-18 16:46:13 +02:00
getData,
2018-05-18 17:54:38 +02:00
onChange,
2018-05-22 11:52:29 +02:00
onClickRemove,
2018-06-04 20:51:57 +02:00
onClickSelect,
2018-06-04 20:26:17 +02:00
onClickSelectAll,
2018-06-05 14:20:13 +02:00
onToggleDeleteAll,
2018-05-18 16:46:13 +02:00
onToggleFilters,
openFiltersWithSelections,
2018-05-21 17:16:04 +02:00
removeAllFilters,
2018-05-18 16:46:13 +02:00
removeFilter,
setParams,
2018-05-21 17:16:04 +02:00
submit,
2018-05-18 16:46:13 +02:00
} from './actions';
2018-02-20 11:34:15 +01:00
import reducer from './reducer';
import saga from './saga';
import makeSelectListPage from './selectors';
2018-05-22 16:55:58 +02:00
import {
generateFiltersFromSearch,
generateSearchFromFilters,
generateSearchFromParams,
} from './utils';
2018-02-20 11:34:15 +01:00
2018-02-20 11:53:18 +01:00
import styles from './styles.scss';
2018-02-20 11:34:15 +01:00
2018-02-20 14:25:45 +01:00
export class ListPage extends React.Component {
2018-05-30 13:59:49 +02:00
state = { showWarning: false, target: '' };
2018-02-20 15:51:20 +01:00
2018-02-20 14:25:45 +01:00
componentDidMount() {
this.getData(this.props);
}
componentDidUpdate(prevProps) {
2018-05-18 11:41:42 +02:00
const {
location: { pathname, search },
} = prevProps;
const {
2018-06-06 16:49:25 +02:00
listPage: { filtersUpdated },
2018-05-18 11:41:42 +02:00
} = this.props;
if (pathname !== this.props.location.pathname) {
this.getData(this.props);
2018-05-30 13:59:49 +02:00
this.shouldHideFilters();
2018-02-20 19:20:31 +01:00
}
if (search !== this.props.location.search) {
2018-06-18 12:19:22 +02:00
this.getData(this.props, true);
2018-06-06 12:47:29 +02:00
}
2018-05-22 16:55:58 +02:00
if (prevProps.listPage.filtersUpdated !== filtersUpdated) {
const updatedSearch = this.generateSearch();
this.props.history.push({ pathname, search: updatedSearch });
}
2018-02-20 19:20:31 +01:00
}
componentWillUnmount() {
if (this.props.listPage.showFilter) {
this.props.onToggleFilters();
}
}
2018-02-20 16:58:05 +01:00
/**
* Helper to retrieve the current model data
* @return {Object} the current model
*/
2018-03-27 10:13:13 +02:00
getCurrentModel = () =>
get(this.props.models, ['models', this.getCurrentModelName()]) ||
get(this.props.models, ['plugins', this.getSource(), 'models', this.getCurrentModelName()]);
2018-02-20 16:58:05 +01:00
/**
* Helper to retrieve the current model name
* @return {String} the current model's name
*/
getCurrentModelName = () => this.props.match.params.slug;
/**
* Function to fetch data
* @param {Object} props
*/
2018-06-18 12:19:22 +02:00
getData = (props, setUpdatingParams = false) => {
2018-02-20 19:20:31 +01:00
const source = getQueryParameters(props.location.search, 'source');
const _limit = toInteger(getQueryParameters(props.location.search, '_limit')) || 10;
const _page = toInteger(getQueryParameters(props.location.search, '_page')) || 1;
const _sort = this.findPageSort(props);
2018-06-12 11:43:41 +02:00
const _q = getQueryParameters(props.location.search, '_q') || '';
const params = { _limit, _page, _sort, _q };
2018-05-22 16:55:58 +02:00
const filters = generateFiltersFromSearch(props.location.search);
2018-02-20 19:20:31 +01:00
2018-05-22 15:25:21 +02:00
this.props.setParams(params, filters);
2018-06-18 12:19:22 +02:00
this.props.getData(props.match.params.slug, source, setUpdatingParams);
2018-03-27 10:13:13 +02:00
};
2018-02-20 15:51:20 +01:00
2018-02-20 16:58:05 +01:00
/**
* Helper to retrieve the model's source
* @return {String} the model's source
*/
getSource = () => getQueryParameters(this.props.location.search, 'source') || 'content-manager';
2018-05-18 11:41:42 +02:00
/**
* Retrieve the model's schema
* @return {Object} Fields
*/
getCurrentSchema = () =>
get(this.props.schema, [this.getCurrentModelName(), 'fields']) ||
get(this.props.schema, ['plugins', this.getSource(), this.getCurrentModelName(), 'fields']);
2018-06-05 14:20:13 +02:00
getPopUpDeleteAllMsg = () => (
this.props.listPage.entriesToDelete.length > 1 ?
'content-manager.popUpWarning.bodyMessage.contentType.delete.all'
: 'content-manager.popUpWarning.bodyMessage.contentType.delete'
);
2018-05-16 18:59:29 +02:00
2018-05-22 15:25:21 +02:00
/**
* Generate the redirect URI when editing an entry
* @type {String}
*/
2018-06-13 16:17:19 +02:00
generateRedirectURI = () => (
`?redirectUrl=/plugins/content-manager/${this.getCurrentModelName().toLowerCase()}${this.generateSearch()}`
);
generateSearch = () => {
2018-05-22 15:25:21 +02:00
const {
listPage: { filters, params },
} = this.props;
2018-05-22 16:55:58 +02:00
return `?${generateSearchFromParams(params)}&source=${this.getSource()}${generateSearchFromFilters(filters)}`;
}
2018-05-22 15:25:21 +02:00
2018-02-20 16:58:05 +01:00
/**
* Function to generate the Table's headers
* @return {Array}
*/
generateTableHeaders = () => {
2018-03-27 10:13:13 +02:00
const currentSchema =
get(this.props.schema, [this.getCurrentModelName()]) ||
get(this.props.schema, ['plugins', this.getSource(), this.getCurrentModelName()]);
const tableHeaders = map(currentSchema.list, value => ({
2018-02-20 16:58:05 +01:00
name: value,
label: currentSchema.fields[value].label,
type: currentSchema.fields[value].type,
}));
2018-03-27 10:13:13 +02:00
tableHeaders.splice(0, 0, {
name: this.getCurrentModel().primaryKey || 'id',
label: 'Id',
type: 'string',
});
2018-02-20 16:58:05 +01:00
return tableHeaders;
2018-03-27 10:13:13 +02:00
};
2018-02-20 16:58:05 +01:00
2018-06-05 14:20:13 +02:00
areAllEntriesSelected = () => {
const { listPage: { entriesToDelete, records } } = this.props;
2018-06-13 16:17:19 +02:00
return entriesToDelete.length === get(records, this.getCurrentModelName(), []).length && get(records, this.getCurrentModelName(), []).length > 0;
2018-06-05 14:20:13 +02:00
};
2018-02-20 15:51:20 +01:00
/**
* [findPageSort description]
* @param {Object} props [description]
* @return {String} the model's primaryKey
*/
2018-03-27 10:13:13 +02:00
findPageSort = props => {
2018-05-18 11:41:42 +02:00
const {
match: {
params: { slug },
},
} = props;
2018-02-20 16:58:05 +01:00
const source = this.getSource();
2018-03-27 10:13:13 +02:00
const modelPrimaryKey = get(props.models, ['models', slug.toLowerCase(), 'primaryKey']);
2018-02-20 15:51:20 +01:00
// Check if the model is in a plugin
2018-03-27 10:13:13 +02:00
const pluginModelPrimaryKey = get(props.models.plugins, [
source,
'models',
slug.toLowerCase(),
'primaryKey',
]);
2018-02-20 15:51:20 +01:00
2018-03-27 10:13:13 +02:00
return (
getQueryParameters(props.location.search, '_sort') ||
2018-03-27 10:13:13 +02:00
modelPrimaryKey ||
pluginModelPrimaryKey ||
'id'
);
};
2018-02-20 14:25:45 +01:00
2018-03-27 10:13:13 +02:00
handleChangeParams = e => {
2018-05-18 11:41:42 +02:00
const {
history,
listPage: { filters, params },
2018-05-18 11:41:42 +02:00
} = this.props;
2018-06-12 11:43:41 +02:00
const _q = params._q !== '' ? `&_q=${params._q}` : '';
const searchEnd = `&_sort=${params._sort}${_q}&source=${this.getSource()}${generateSearchFromFilters(filters)}`;
2018-03-27 10:13:13 +02:00
const search =
e.target.name === 'params._limit'
? `_page=${params._page}&_limit=${e.target.value}${searchEnd}`
: `_page=${e.target.value}&_limit=${params._limit}${searchEnd}`;
2018-02-20 19:20:31 +01:00
this.props.history.push({
pathname: history.pathname,
search,
});
this.props.changeParams(e);
2018-03-27 10:13:13 +02:00
};
2018-02-20 19:20:31 +01:00
2018-03-27 10:13:13 +02:00
handleChangeSort = sort => {
2018-02-20 19:20:31 +01:00
const target = {
name: 'params._sort',
2018-02-20 19:20:31 +01:00
value: sort,
};
2018-05-18 11:41:42 +02:00
const {
listPage: { filters, params },
2018-05-18 11:41:42 +02:00
} = this.props;
2018-06-12 11:43:41 +02:00
const _q = params._q !== '' ? `&_q=${params._q}` : '';
2018-02-20 19:20:31 +01:00
this.props.history.push({
pathname: this.props.location.pathname,
2018-05-18 11:41:42 +02:00
search: `?_page=${params._page}&_limit=${
params._limit
2018-06-12 11:43:41 +02:00
}&_sort=${sort}${_q}&source=${this.getSource()}${generateSearchFromFilters(filters)}`,
2018-02-20 19:20:31 +01:00
});
2018-05-22 16:55:58 +02:00
2018-02-20 19:20:31 +01:00
this.props.changeParams({ target });
2018-03-27 10:13:13 +02:00
};
2018-02-20 19:20:31 +01:00
2018-03-27 10:13:13 +02:00
handleDelete = e => {
2018-02-20 19:20:31 +01:00
e.preventDefault();
e.stopPropagation();
2018-02-20 19:29:30 +01:00
this.props.deleteData(this.state.target, this.getCurrentModelName(), this.getSource());
2018-02-20 19:20:31 +01:00
this.setState({ showWarning: false });
2018-03-27 10:13:13 +02:00
};
2018-02-20 19:20:31 +01:00
2018-05-21 17:16:04 +02:00
handleSubmit = e => {
try {
e.preventDefault();
2018-05-22 15:25:21 +02:00
} catch (err) {
2018-05-21 17:16:04 +02:00
// Silent
} finally {
this.props.submit();
}
2018-05-22 15:25:21 +02:00
};
2018-05-21 17:16:04 +02:00
2018-06-05 14:20:13 +02:00
shouldHideFilters = () => {
if (this.props.listPage.showFilter) {
this.props.onToggleFilters();
}
2018-06-04 20:26:17 +02:00
};
2018-03-27 10:13:13 +02:00
toggleModalWarning = e => {
2018-02-20 19:20:31 +01:00
if (!isUndefined(e)) {
e.preventDefault();
e.stopPropagation();
this.setState({
target: e.target.id,
});
}
2018-06-06 12:47:29 +02:00
if (this.props.listPage.entriesToDelete.length > 0) {
this.props.onClickSelectAll();
}
this.setState(prevState => ({ showWarning: !prevState.showWarning }));
2018-03-27 10:13:13 +02:00
};
2018-02-20 19:20:31 +01:00
2018-06-13 16:17:19 +02:00
showLoaders = () => {
2018-06-18 12:19:22 +02:00
const { listPage: { isLoading, records, updatingParams } } = this.props;
2018-06-13 16:17:19 +02:00
2018-06-18 12:19:22 +02:00
return updatingParams || isLoading && get(records, this.getCurrentModelName()) === undefined;
2018-06-13 16:17:19 +02:00
}
2018-02-20 11:34:15 +01:00
render() {
2018-05-18 11:41:42 +02:00
const {
2018-05-18 16:46:13 +02:00
addFilter,
2018-06-05 14:20:13 +02:00
deleteSeveralData,
2018-05-18 11:41:42 +02:00
listPage,
2018-06-05 14:20:13 +02:00
listPage: {
appliedFilters,
2018-06-13 16:17:19 +02:00
count,
2018-06-05 14:20:13 +02:00
entriesToDelete,
filters,
filterToFocus,
2018-06-13 16:17:19 +02:00
records,
2018-06-05 14:20:13 +02:00
params,
showFilter,
showWarningDeleteAll,
},
2018-05-18 17:54:38 +02:00
onChange,
2018-05-22 11:52:29 +02:00
onClickRemove,
2018-06-04 20:51:57 +02:00
onClickSelect,
2018-06-04 20:26:17 +02:00
onClickSelectAll,
2018-06-05 14:20:13 +02:00
onToggleDeleteAll,
2018-05-18 16:46:13 +02:00
onToggleFilters,
openFiltersWithSelections,
2018-05-21 17:16:04 +02:00
removeAllFilters,
2018-05-18 16:46:13 +02:00
removeFilter,
2018-05-18 11:41:42 +02:00
} = this.props;
2018-02-22 11:33:01 +01:00
const pluginHeaderActions = [
{
label: 'content-manager.containers.List.addAnEntry',
labelValues: {
entity: capitalize(this.props.match.params.slug) || 'Content Manager',
},
kind: 'primaryAddShape',
2018-03-27 10:13:13 +02:00
onClick: () =>
this.props.history.push({
pathname: `${this.props.location.pathname}/create`,
search: this.generateRedirectURI(),
2018-03-27 10:13:13 +02:00
}),
2018-02-22 11:33:01 +01:00
},
];
2018-02-20 16:58:05 +01:00
2018-02-20 11:34:15 +01:00
return (
<div>
2018-02-20 11:53:18 +01:00
<div className={cn('container-fluid', styles.containerFluid)}>
2018-06-07 10:38:30 +02:00
<Search
2018-06-07 14:19:34 +02:00
changeParams={this.props.changeParams}
2018-06-12 11:43:41 +02:00
initValue={getQueryParameters(this.props.location.search, '_q') || ''}
2018-06-07 18:50:43 +02:00
model={this.getCurrentModelName()}
2018-06-12 11:43:41 +02:00
value={params._q}
2018-06-07 10:38:30 +02:00
/>
2018-05-30 13:59:49 +02:00
<PluginHeader
actions={pluginHeaderActions}
description={{
id:
2018-06-13 16:17:19 +02:00
get(count, this.getCurrentModelName(), 0) > 1
2018-05-30 13:59:49 +02:00
? 'content-manager.containers.List.pluginHeaderDescription'
: 'content-manager.containers.List.pluginHeaderDescription.singular',
values: {
2018-06-13 16:17:19 +02:00
label: get(count, this.getCurrentModelName(), 0),
2018-05-30 13:59:49 +02:00
},
}}
title={{
id: this.getCurrentModelName() || 'Content Manager',
}}
2018-06-13 16:17:19 +02:00
withDescriptionAnim={this.showLoaders()}
2018-05-30 13:59:49 +02:00
/>
<div className={cn(styles.wrapper)}>
<FiltersPickWrapper
addFilter={addFilter}
appliedFilters={appliedFilters}
close={onToggleFilters}
filterToFocus={filterToFocus}
modelName={this.getCurrentModelName()}
onChange={onChange}
onSubmit={this.handleSubmit}
removeAllFilters={removeAllFilters}
removeFilter={removeFilter}
schema={this.getCurrentSchema()}
show={showFilter}
2018-05-16 18:59:29 +02:00
/>
2018-05-30 13:59:49 +02:00
<div className={cn('row', styles.row)}>
<div className="col-md-12">
<Div
decreaseMarginBottom={filters.length > 0}
>
<div className="row">
<AddFilterCTA onClick={onToggleFilters} showHideText={showFilter} />
{filters.map((filter, key) => (
<Filter
key={key}
filter={filter}
index={key}
onClick={onClickRemove}
onClickOpen={openFiltersWithSelections}
schema={this.getCurrentSchema()}
/>
))}
</div>
</Div>
</div>
2018-05-15 17:01:47 +02:00
</div>
2018-05-30 13:59:49 +02:00
<div className={cn('row', styles.row)}>
<div className="col-md-12">
<Table
2018-06-05 14:20:13 +02:00
deleteAllValue={this.areAllEntriesSelected()}
entriesToDelete={entriesToDelete}
filters={filters}
handleDelete={this.toggleModalWarning}
headers={this.generateTableHeaders()}
history={this.props.history}
onChangeSort={this.handleChangeSort}
2018-06-04 20:26:17 +02:00
onClickSelectAll={onClickSelectAll}
2018-06-04 20:51:57 +02:00
onClickSelect={onClickSelect}
2018-06-05 14:20:13 +02:00
onToggleDeleteAll={onToggleDeleteAll}
primaryKey={this.getCurrentModel().primaryKey || 'id'}
2018-06-13 16:17:19 +02:00
records={get(records, this.getCurrentModelName(), [])}
2018-06-05 14:20:13 +02:00
redirectUrl={this.generateRedirectURI()}
2018-05-30 13:59:49 +02:00
route={this.props.match}
routeParams={this.props.match.params}
2018-06-12 11:43:41 +02:00
search={params._q}
2018-06-13 16:17:19 +02:00
showLoader={this.showLoaders()}
2018-05-30 13:59:49 +02:00
sort={params._sort}
/>
<PopUpWarning
isOpen={this.state.showWarning}
toggleModal={this.toggleModalWarning}
content={{
title: 'content-manager.popUpWarning.title',
message: 'content-manager.popUpWarning.bodyMessage.contentType.delete',
cancel: 'content-manager.popUpWarning.button.cancel',
confirm: 'content-manager.popUpWarning.button.confirm',
}}
popUpWarningType="danger"
onConfirm={this.handleDelete}
/>
2018-06-05 14:20:13 +02:00
<PopUpWarning
isOpen={showWarningDeleteAll}
toggleModal={onToggleDeleteAll}
content={{
title: 'content-manager.popUpWarning.title',
message: this.getPopUpDeleteAllMsg(),
cancel: 'content-manager.popUpWarning.button.cancel',
confirm: 'content-manager.popUpWarning.button.confirm',
}}
popUpWarningType="danger"
onConfirm={() => {
2018-06-05 17:56:53 +02:00
deleteSeveralData(entriesToDelete, this.getCurrentModelName(), this.getSource());
2018-06-05 14:20:13 +02:00
}}
/>
2018-05-30 13:59:49 +02:00
<PageFooter
2018-06-13 16:17:19 +02:00
count={get(count, this.getCurrentModelName(), 0)}
2018-05-30 13:59:49 +02:00
onChangeParams={this.handleChangeParams}
params={listPage.params}
style={{ marginTop: '2.9rem', padding: '0 15px 0 15px' }}
/>
</div>
2018-02-20 16:58:05 +01:00
</div>
</div>
2018-02-20 11:53:18 +01:00
</div>
2018-02-20 11:34:15 +01:00
</div>
);
}
}
2018-02-20 14:25:45 +01:00
ListPage.propTypes = {
2018-05-18 16:46:13 +02:00
addFilter: PropTypes.func.isRequired,
2018-02-20 19:20:31 +01:00
changeParams: PropTypes.func.isRequired,
deleteData: PropTypes.func.isRequired,
2018-06-05 14:20:13 +02:00
deleteSeveralData: PropTypes.func.isRequired,
2018-02-20 14:25:45 +01:00
getData: PropTypes.func.isRequired,
history: PropTypes.object.isRequired,
listPage: PropTypes.object.isRequired,
location: PropTypes.object.isRequired,
match: PropTypes.object.isRequired,
2018-02-20 15:51:20 +01:00
models: PropTypes.object.isRequired,
2018-05-18 17:54:38 +02:00
onChange: PropTypes.func.isRequired,
2018-05-22 11:52:29 +02:00
onClickRemove: PropTypes.func.isRequired,
2018-06-04 20:51:57 +02:00
onClickSelect: PropTypes.func.isRequired,
2018-06-04 20:26:17 +02:00
onClickSelectAll: PropTypes.func.isRequired,
2018-06-05 14:20:13 +02:00
onToggleDeleteAll: PropTypes.func.isRequired,
2018-05-16 11:27:12 +02:00
onToggleFilters: PropTypes.func.isRequired,
openFiltersWithSelections: PropTypes.func.isRequired,
2018-05-21 17:16:04 +02:00
removeAllFilters: PropTypes.func.isRequired,
2018-05-18 16:46:13 +02:00
removeFilter: PropTypes.func.isRequired,
2018-02-20 16:58:05 +01:00
schema: PropTypes.object.isRequired,
2018-02-20 15:51:20 +01:00
setParams: PropTypes.func.isRequired,
2018-05-21 17:16:04 +02:00
submit: PropTypes.func.isRequired,
2018-02-20 14:25:45 +01:00
};
2018-02-20 11:34:15 +01:00
function mapDispatchToProps(dispatch) {
return bindActionCreators(
{
2018-05-18 16:46:13 +02:00
addFilter,
2018-02-20 15:51:20 +01:00
changeParams,
2018-02-20 19:20:31 +01:00
deleteData,
2018-06-05 14:20:13 +02:00
deleteSeveralData,
2018-02-20 14:25:45 +01:00
getData,
2018-05-18 17:54:38 +02:00
onChange,
2018-05-22 11:52:29 +02:00
onClickRemove,
2018-06-04 20:51:57 +02:00
onClickSelect,
2018-06-04 20:26:17 +02:00
onClickSelectAll,
2018-06-05 14:20:13 +02:00
onToggleDeleteAll,
2018-05-16 11:27:12 +02:00
onToggleFilters,
openFiltersWithSelections,
2018-05-21 17:16:04 +02:00
removeAllFilters,
2018-05-18 16:46:13 +02:00
removeFilter,
2018-02-20 15:51:20 +01:00
setParams,
2018-05-21 17:16:04 +02:00
submit,
2018-02-20 11:34:15 +01:00
},
dispatch,
);
}
const mapStateToProps = createStructuredSelector({
listPage: makeSelectListPage(),
2018-02-20 15:51:20 +01:00
models: makeSelectModels(),
2018-02-20 16:58:05 +01:00
schema: makeSelectSchema(),
2018-02-20 11:34:15 +01:00
});
const withConnect = connect(mapStateToProps, mapDispatchToProps);
const withReducer = injectReducer({ key: 'listPage', reducer });
const withSaga = injectSaga({ key: 'listPage', saga });
2018-03-27 10:13:13 +02:00
export default compose(withReducer, withSaga, withConnect)(ListPage);