49 lines
1.0 KiB
JavaScript
49 lines
1.0 KiB
JavaScript
const { connect } = require('preact-redux');
|
|
const preact = require('preact');
|
|
|
|
const actions = require('./../actions');
|
|
|
|
const addState = connect(
|
|
function receiveState(state) {
|
|
const { showNav } = state;
|
|
return { showNav };
|
|
},
|
|
function receiveDispatch(dispatch) {
|
|
function navToTeam() {
|
|
return dispatch(actions.setNav('team'));
|
|
}
|
|
|
|
function setShowNav(v) {
|
|
return dispatch(actions.setShowNav(v));
|
|
}
|
|
|
|
return {
|
|
navToTeam,
|
|
setShowNav,
|
|
};
|
|
}
|
|
);
|
|
|
|
function ListFooter(args) {
|
|
return false;
|
|
|
|
// const {
|
|
// showNav,
|
|
|
|
// navToTeam,
|
|
// setShowNav,
|
|
// } = args;
|
|
|
|
// return (
|
|
// <footer>
|
|
// <button id="nav-btn" onClick={() => setShowNav(!showNav)} >☰</button>
|
|
// <button
|
|
// onClick={() => navToTeam()}>
|
|
// Back
|
|
// </button>
|
|
// </footer>
|
|
// );
|
|
}
|
|
|
|
module.exports = addState(ListFooter);
|