Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | import React from 'react'; import PropTypes from 'prop-types'; class SummaryMain extends React.Component { constructor(props) { super(props); } onNewContactButtonClick() { this.props.loadSummaryData(); } render() { let {profileDetails} = this.props; return ( <div> <div className="summarySection container-fluid"> create New Profile: <button className={'btn btn-primary'} style={{margin: '15px'}} onClick={this.onNewContactButtonClick.bind(this)}>New Profile </button> <div style={{backgroundColor: '#F7DC6F', fontWeight: 'bold'}}> <pre>{JSON.stringify(profileDetails.summaryData, null, 2)}</pre> </div> </div> </div> ); } } SummaryMain.propTypes = { profileDetails: PropTypes.object.isRequired }; SummaryMain.defaultProps = {}; export default SummaryMain; |