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

const actions = require('./../actions');

const Team = require('./team');
const Collection = require('./collection');

const addState = connect(
    function receiveState(state) {
        const {
            nav,
        } = state;

        return {
            nav,
        };
    },
);

function Bottom(args) {
    const {
        nav,
    } = args;

    if (nav === 'account') return <Collection />;
    return <Team />;
}

module.exports = addState(Bottom);
