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

Working two-player game ready!

This commit is contained in:
Mizanali Panjwani
2021-02-22 21:04:17 +05:30
parent 6d064cec4b
commit 183229e791
7 changed files with 181 additions and 261 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +1,14 @@
import React from 'react'
import React, { useState } from 'react'
import { Link } from 'react-router-dom'
const Homepage = () => {
const [roomCode, setRoomCode] = useState('')
return (
<div className='Homepage'>
<h1>UNO</h1>
<Link to='/play'><button>START GAME</button></Link>
<div><input type='text' placeholder='Room' onChange={(event) => setRoomCode(event.target.value)} /></div>
<Link to={`/play?roomCode=${roomCode}`}><button>START GAME</button></Link>
</div>
)
}