forked from Github/uno-online
Working two-player game ready!
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user