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

19 lines
516 B
JavaScript
Raw Normal View History

2017-06-06 17:19:12 -04:00
import React from "react";
import lbry from "lbry";
import { connect } from "react-redux";
import { selectBalance } from "selectors/wallet";
import { doNavigate, doHistoryBack } from "actions/app";
import Header from "./view";
2017-04-22 20:17:01 +07:00
2017-06-05 21:21:55 -07:00
const select = state => ({
balance: lbry.formatCredits(selectBalance(state), 1),
publish: __("Publish"),
2017-06-05 21:21:55 -07:00
});
2017-04-22 20:17:01 +07:00
2017-06-05 21:21:55 -07:00
const perform = dispatch => ({
2017-06-06 17:19:12 -04:00
navigate: path => dispatch(doNavigate(path)),
2017-05-03 23:44:08 -04:00
back: () => dispatch(doHistoryBack()),
2017-06-05 21:21:55 -07:00
});
2017-04-22 20:17:01 +07:00
2017-06-05 21:21:55 -07:00
export default connect(select, perform)(Header);