mirror of
https://github.com/strapi/strapi.git
synced 2025-12-28 23:57:32 +00:00
Fix ExamplePage container
This commit is contained in:
parent
cf70c5e003
commit
743e635d7a
@ -24,17 +24,16 @@ import saga from './saga';
|
||||
|
||||
export class ExamplePage extends React.Component {
|
||||
generateDataBlock() {
|
||||
let dataBlock;
|
||||
if (this.props.data) {
|
||||
const items = this.props.data.map((item, i) => <li key={i}>{item}</li>);
|
||||
dataBlock = (
|
||||
return (
|
||||
<div>
|
||||
<p>Data:</p>
|
||||
<ul>{items}</ul>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return dataBlock;
|
||||
return;
|
||||
}
|
||||
|
||||
render() {
|
||||
@ -75,10 +74,12 @@ ExamplePage.propTypes = {
|
||||
};
|
||||
|
||||
function mapDispatchToProps(dispatch) {
|
||||
return {
|
||||
loadData: () => dispatch(loadData()),
|
||||
dispatch,
|
||||
};
|
||||
return bindActionCreators(
|
||||
{
|
||||
loadData,
|
||||
},
|
||||
dipatch,
|
||||
);
|
||||
}
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user