pages/home.js
import React, { Component } from "react";
import "../App.css";
import "bootstrap/dist/css/bootstrap.css";
import { selectGame } from "../Action/action";
import { connect } from "react-redux";
export class Games extends Component {
handlebook = i => {
};
handleSearch = () => {
};
render() {
// Template to display each game
//
//
// -
//
//
//
// -
//
//
//
//
return (
{/* code goes here to display the title and and an image */}
{/* code goes here to loop the each game */}
);
}
}
const mapStateToProps = state => {
return {
Games: state.Games
};
};
const mapDispatchToProps = dispatch => {
return {
postDate: (date) => dispatch({ type: "TODAY_DATE", date }),
selectGame: id => dispatch(selectGame(id)),
getGameAndBooking: () => dispatch({ type: "GAME_BOOKING" })
};
};
export default connect(
mapStateToProps,
mapDispatchToProps
)(Games);