const { connect } = require('preact-redux');

const Header = require('./header.component');
const actions = require('./../actions');

const addState = connect(
    ({ account, ping, showNav }) => {
        return { account, ping, showNav };
    },
    dispatch => ({
        setShowNav: v => dispatch(actions.setShowNav(v)),
    })
);

module.exports = addState(Header);
