diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index d1644c0..2789dda 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -5,7 +5,6 @@ import AppLayout from './pages/AppLayout'; import Error from './pages/Error'; import Game from './pages/Game'; import About from './pages/About'; -import PlayOptions from './pages/PlayOptions'; const router = createBrowserRouter([ { @@ -17,10 +16,6 @@ const router = createBrowserRouter([ path: '/', element: , }, - { - path: '/play', - element: , - }, { path: '/game', element: , diff --git a/frontend/src/pages/Home.tsx b/frontend/src/pages/Home.tsx index c7f4bec..033bdd9 100644 --- a/frontend/src/pages/Home.tsx +++ b/frontend/src/pages/Home.tsx @@ -1,12 +1,90 @@ -import { Link } from 'react-router-dom'; +import React, { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; +import Button from '../library/button'; +import Heading from '../library/heading'; +import '../index.css'; + +const Home: React.FC = () => { + const [gameCode, setGameCode] = useState(''); + const navigate = useNavigate(); + const CreateGame = () => { + // Logic to create a game + console.log('Create Game'); + navigate('/game'); + }; + + const JoinGame = () => { + // Logic to join a game + console.log('Join Game with code:', gameCode); + }; -function Home() { return ( - <> -
Home Page
- Play - +
+
+
+ UNO Logo + +
+
+
+
+ +
+
+
+
+ +
+
+ setGameCode(e.target.value)} + className="border-2 border-red-600 rounded-lg p-1 mb-4 text-md w-full bg-black text-white" + /> +
+
+
+
+
); -} +}; export default Home; diff --git a/frontend/src/pages/PlayOptions.tsx b/frontend/src/pages/PlayOptions.tsx deleted file mode 100644 index c64e079..0000000 --- a/frontend/src/pages/PlayOptions.tsx +++ /dev/null @@ -1,90 +0,0 @@ -import React, { useState } from 'react'; -import { useNavigate } from 'react-router-dom'; -import Button from '../library/button'; -import Heading from '../library/heading'; -import '../index.css'; - -const PlayOptions: React.FC = () => { - const [gameCode, setGameCode] = useState(''); - const navigate = useNavigate(); - const CreateGame = () => { - // Logic to create a game - console.log('Create Game'); - navigate('/game'); - }; - - const JoinGame = () => { - // Logic to join a game - console.log('Join Game with code:', gameCode); - }; - - return ( -
-
-
- UNO Logo - -
-
-
-
- -
-
-
-
- -
-
- setGameCode(e.target.value)} - className="border-2 border-red-600 rounded-lg p-1 mb-4 text-md w-full bg-black text-white" - /> -
-
-
-
-
- ); -}; - -export default PlayOptions;