29 |
30 |
31 |
32 | {children ? React.cloneElement(children, props) : (
33 |
34 | )}
35 |
36 | );
37 | };
38 |
39 | export default FormGroup;
40 |
--------------------------------------------------------------------------------
/src/client/containers/Home.tsx:
--------------------------------------------------------------------------------
1 | import { Post, State } from 'common';
2 | import * as React from 'react';
3 | import { connect } from 'react-redux';
4 |
5 | import PostComponent from '../components/Post';
6 |
7 | interface Props {
8 | posts?: Post[];
9 | }
10 |
11 | const mapStateToProps = (state: State): State => ({
12 | posts: state.posts,
13 | });
14 |
15 | type AllProps = Readonly