You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
722 B
26 lines
722 B
import { connect } from 'react-redux';
|
|
import { createSelector } from 'reselect';
|
|
import { gotoCalendarNextRange, gotoCalendarPreviousRange } from 'Store/Actions/calendarActions';
|
|
import CalendarDays from './CalendarDays';
|
|
|
|
function createMapStateToProps() {
|
|
return createSelector(
|
|
(state) => state.calendar,
|
|
(state) => state.app.isSidebarVisible,
|
|
(calendar, isSidebarVisible) => {
|
|
return {
|
|
dates: calendar.dates,
|
|
view: calendar.view,
|
|
isSidebarVisible
|
|
};
|
|
}
|
|
);
|
|
}
|
|
|
|
const mapDispatchToProps = {
|
|
onNavigatePrevious: gotoCalendarPreviousRange,
|
|
onNavigateNext: gotoCalendarNextRange
|
|
};
|
|
|
|
export default connect(createMapStateToProps, mapDispatchToProps)(CalendarDays);
|