2017-01-17 13:40:59 +01:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* {{properCase name }}
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
import React from 'react';
|
2017-08-22 15:53:22 +02:00
|
|
|
import PropTypes from 'prop-types';
|
2017-01-17 13:40:59 +01:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
{{#if wantHeaders}}
|
2017-08-22 15:53:22 +02:00
|
|
|
import { Helmet } from 'react-helmet';
|
|
|
|
{{/if}}
|
|
|
|
{{#if wantMessages}}
|
|
|
|
import { FormattedMessage } from 'react-intl';
|
2017-01-17 13:40:59 +01:00
|
|
|
{{/if}}
|
|
|
|
{{#if wantActionsAndReducer}}
|
2017-08-22 15:53:22 +02:00
|
|
|
import { createStructuredSelector } from 'reselect';
|
|
|
|
import makeSelect{{properCase name}} from './selectors';
|
2017-01-17 13:40:59 +01:00
|
|
|
{{/if}}
|
|
|
|
{{#if wantMessages}}
|
|
|
|
import messages from './messages';
|
|
|
|
{{/if}}
|
|
|
|
|
2017-08-22 15:53:22 +02:00
|
|
|
export class {{ properCase name }} extends React.{{{ component }}} { // eslint-disable-line react/prefer-stateless-function
|
2017-01-17 13:40:59 +01:00
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
{{#if wantHeaders}}
|
2017-08-22 15:53:22 +02:00
|
|
|
<Helmet>
|
|
|
|
<title>{{properCase name}}</title>
|
|
|
|
<meta name="description" content="Description of {{properCase name}}" />
|
|
|
|
</Helmet>
|
2017-01-17 13:40:59 +01:00
|
|
|
{{/if}}
|
|
|
|
{{#if wantMessages}}
|
|
|
|
<FormattedMessage {...messages.header} />
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-22 15:53:22 +02:00
|
|
|
{{ properCase name }}.propTypes = {
|
|
|
|
dispatch: PropTypes.func.isRequired,
|
|
|
|
};
|
|
|
|
|
2017-01-17 13:40:59 +01:00
|
|
|
{{#if wantActionsAndReducer}}
|
2017-08-22 15:53:22 +02:00
|
|
|
const mapStateToProps = createStructuredSelector({
|
|
|
|
{{name}}: makeSelect{{properCase name}}(),
|
|
|
|
});
|
2017-01-17 13:40:59 +01:00
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
function mapDispatchToProps(dispatch) {
|
|
|
|
return {
|
|
|
|
dispatch,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
{{#if wantActionsAndReducer}}
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)({{ properCase name }});
|
|
|
|
{{else}}
|
2017-08-22 15:53:22 +02:00
|
|
|
export default connect(null, mapDispatchToProps)({{ properCase name }});
|
2017-01-17 13:40:59 +01:00
|
|
|
{{/if}}
|