2017-04-22 15:17:01 +02:00
|
|
|
import React from 'react'
|
|
|
|
import {
|
|
|
|
connect
|
|
|
|
} from 'react-redux'
|
|
|
|
import {
|
2017-05-04 05:44:08 +02:00
|
|
|
selectBalance
|
|
|
|
} from 'selectors/wallet'
|
2017-04-22 15:17:01 +02:00
|
|
|
import {
|
|
|
|
doNavigate,
|
2017-05-04 05:44:08 +02:00
|
|
|
doHistoryBack,
|
2017-04-22 15:17:01 +02:00
|
|
|
} from 'actions/app'
|
|
|
|
import Header from './view'
|
|
|
|
|
|
|
|
const select = (state) => ({
|
2017-05-04 05:44:08 +02:00
|
|
|
balance: lbry.formatCredits(selectBalance(state), 1)
|
2017-04-22 15:17:01 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
const perform = (dispatch) => ({
|
|
|
|
navigate: (path) => dispatch(doNavigate(path)),
|
2017-05-04 05:44:08 +02:00
|
|
|
back: () => dispatch(doHistoryBack()),
|
2017-04-22 15:17:01 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
export default connect(select, perform)(Header)
|