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

20 lines
498 B
JavaScript
Raw Normal View History

2017-06-06 23:19:12 +02:00
import React from "react";
import { connect } from "react-redux";
2017-11-13 22:02:23 +01:00
import {
selectCurrentPage,
selectHeaderLinks,
} from "redux/selectors/navigation";
import { doNavigate } from "redux/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);