This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script src="https://unpkg.com/peerjs@1.5.2/dist/peerjs.min.js"></script> | |
| <div class="container"> | |
| <h1>CodePen P2P Tic-Tac-Toe</h1> | |
| <div id="connection-panel"> | |
| <div class="box"> | |
| <h3>I am Host (Player X)</h3> | |
| <p class="label">Share this ID with your friend:</p> | |
| <div id="my-id">Generating ID...</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [{ | |
| "greek": "", | |
| "english": "", | |
| "learning-types": "", | |
| "lessons": "", | |
| "lesson-level": "", | |
| "persona": "", | |
| "words": [{ | |
| "english": "", | |
| "greek": "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { useState } from "react"; | |
| import { useLocation } from "react-router-dom"; | |
| import Answer from "./Components/Answer"; | |
| import Question from "./Components/Question"; | |
| import Score from "./Components/Score"; | |
| function Lesson() { | |
| const [answer, setAnswer] = useState(""); | |
| const [score, setScore] = useState(0); | |
| const [questionIndex, setQuestionIndex] = useState(0); |