2017-06-06 23:19:12 +02:00
|
|
|
import React from "react";
|
|
|
|
import { connect } from "react-redux";
|
2017-08-30 14:48:32 +02:00
|
|
|
import { selectCurrentPage, selectHeaderLinks } from "selectors/navigation";
|
|
|
|
import { doNavigate } from "actions/navigation";
|
2017-06-06 23:19:12 +02:00
|
|
|
import SubHeader from "./view";
|
2017-05-05 07:28:28 +02:00
|
|
|
|
|
|
|
const select = (state, props) => ({
|
|
|
|
currentPage: selectCurrentPage(state),
|
|
|
|
subLinks: selectHeaderLinks(state),
|
2017-06-06 06:21:55 +02:00
|
|
|
});
|
2017-05-05 07:28:28 +02:00
|
|
|
|
2017-06-06 06:21:55 +02:00
|
|
|
const perform = dispatch => ({
|
2017-06-06 23:19:12 +02:00
|
|
|
navigate: path => dispatch(doNavigate(path)),
|
2017-06-06 06:21:55 +02:00
|
|
|
});
|
2017-05-05 07:28:28 +02:00
|
|
|
|
2017-06-06 06:21:55 +02:00
|
|
|
export default connect(select, perform)(SubHeader);
|