1
0
mirror of https://github.com/mizanxali/uno-online synced 2025-12-06 10:13:27 +00:00

Improvements and bug fixes

This commit is contained in:
Mizanali Panjwani
2021-02-17 07:04:27 +05:30
parent ff7cbe703e
commit 8b12e81206
3 changed files with 16 additions and 20 deletions

View File

@@ -1,21 +1,13 @@
import React from 'react'
import { Link } from 'react-router-dom'
import { START_GAME } from '../store/actions'
import { connect } from 'react-redux'
const Homepage = (props) => {
const Homepage = () => {
return (
<div className='Homepage'>
<h1>UNO</h1>
<Link to='/play'><button onClick={props.onStartGame}>START GAME</button></Link>
<Link to='/play'><button>START GAME</button></Link>
</div>
)
}
const mapDispatchToProps = (dispatch) => {
return {
onStartGame: () => dispatch({type: START_GAME})
}
}
export default connect(null, mapDispatchToProps)(Homepage)
export default Homepage