diff --git a/frontend/src/pages/GamePage.jsx b/frontend/src/pages/GamePage.jsx deleted file mode 100644 index e86cc17..0000000 --- a/frontend/src/pages/GamePage.jsx +++ /dev/null @@ -1,22 +0,0 @@ -import { useEffect, useState } from 'react'; -import { useParams } from 'react-router-dom'; -import Choice from '../components/choice/Choice'; -import Comment from "../components/comments/Comments" - -export default function GamePage() { - const [gameData, setGameData] = useState([]) - const { id } = useParams() - useEffect(() => { - const a = async () => { - const res = await fetch(`http://localhost:5173/api/game/${id}`); - const data = await res.json(); - console.log(data.data); - setGameData(data.data); - }; - a(); - }, []); - return (<> - - - ) -} diff --git a/frontend/src/router.jsx b/frontend/src/router.jsx index 02f8e07..3bbb5a0 100644 --- a/frontend/src/router.jsx +++ b/frontend/src/router.jsx @@ -1,9 +1,9 @@ import { createBrowserRouter } from 'react-router-dom'; import GlobalLayout from './layout/GlobalLayout'; import MainPage from './pages/MainPage'; -import GamePage from './pages/GamePage'; import LoginPage from './pages/LoginPage/LoginPage'; import CreatePage from './pages/CreatePage/CreatePage'; +import GamePage from './pages/GamePage/GamePage'; export const router = createBrowserRouter([ {