Created
September 5, 2016 11:10
-
-
Save edjafarov/a23c6c22cacb75e6035130c841b6273a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {PropTypes} from 'react'; | |
import {connect} from 'react-redux'; | |
import './calendar.scss'; | |
export class CalendarComponent extends React.Component { | |
render() { | |
const { | |
condition, | |
list | |
} = this.props; | |
if (condition) { | |
return <///> | |
} | |
return ( | |
<div className="calendar-component"> | |
{list.map(()=><///>)} | |
</div> | |
); | |
} | |
function mapStateToProps(state) { | |
return { | |
list: state.calendar, | |
condition: state.calendar.length > 100 | |
}; | |
} | |
CalendarComponent.propTypes = { | |
}; | |
CalendarComponent.defaultProps = { | |
}; | |
export default connect(mapStateToProps, null)(CalendarComponent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment