Skip to content

Commit

Permalink
Merge pull request #363 from lekandev/router-linking
Browse files Browse the repository at this point in the history
Router linking
  • Loading branch information
odizee authored Sep 3, 2021
2 parents d2eceac + 1c48018 commit 81b6e80
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client/src/components/MiniBoard/MiniBoard.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from "react";
import {Link} from 'react-router-dom'
import "./MiniBoard.css";
import boardImg from "../../assets/mini-board.png"

Expand All @@ -13,7 +14,7 @@ function MiniBoard({ id, playerOne, playerTwo }) {
<p>Player 1: @{playerOne}</p>
</div>
) : (
<button className="join-button">Join as Player 1</button>
<Link to='/game'><button className="join-button">Join as Player 1</button></Link>
)}
</div>

Expand All @@ -28,7 +29,7 @@ function MiniBoard({ id, playerOne, playerTwo }) {
<p>Player 2: @{playerTwo}</p>
</div>
) : (
<button className="join-button">Join as Player 2</button>
<Link to='/game'><button className="join-button">Join as Player 2</button></Link>
)}
</div>
</div>
Expand Down

0 comments on commit 81b6e80

Please sign in to comment.