lbry-desktop/ui/js/component/subHeader/index.js

17 lines
481 B
JavaScript
Raw Normal View History

2017-06-06 23:19:12 +02:00
import React from "react";
import { connect } from "react-redux";
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);