Uh oh!
There was an error while loading. Please reload this page.
Feature: Share the game link with Opponent - #296
Conversation
hkirat
commented
May 25, 2024
/bounty $50 |
VK-RED
commented
May 25, 2024
Thanks Kirat !! Resolving the conflicts.. |
siinghd
commented
Jun 16, 2024
@VK-RED will check it soon |
VK-RED
commented
Jun 17, 2024
Thanks @siinghd !! |
| const [player1TimeConsumed, setPlayer1TimeConsumed] = useState(0); | ||
| const [player2TimeConsumed, setPlayer2TimeConsumed] = useState(0); | ||
| const [gameID,setGameID] = useState(""); |
There was a problem hiding this comment.
why this?
doesnt const { gameId } = useParams(); work?
There was a problem hiding this comment.
No ser, that won't work. When the first player initially joins he will be at the route /game/random. After receiving the game_added message we will actually get the game ID, using which we create the link ..
There was a problem hiding this comment.
oh, i see the login is different, would be better if we push the user who is wainting to the actual url with the ID: /game/id...
for now mergin this.
| export const ShareGame = ({className,gameId}:{className?:string,gameId:string}) => { | ||
| const [url] = useState(window.origin+"/game/"+gameId); |
There was a problem hiding this comment.
Agreed , will convert to a normal var.
VK-RED
commented
Jun 18, 2024
@siinghd you can check it now ... |
What does this PR do ?
Resolves: #294
Screencast
Screencast.from.06-05-24.10.18.34.PM.IST.webm