feat: add slot, rps routes

This commit is contained in:
Mikhail Saveliev 2024-01-08 19:26:38 +05:00
parent cb50c8856f
commit a41ade4fea
2 changed files with 12 additions and 2 deletions

View file

@ -71,7 +71,7 @@ export const MainPage = () => {
<div className="flex flex-col h-full justify-between">
<div className="flex flex-row justify-between min-w-[200px] my-auto">
<span className="text-xl font-bold uppercase">Rock paper scissors</span>
<button className="bg-blue-500 min-w-[103px] max-h-[45px] rounded-[10px] border border-blue-400 font-bold px-3 inline-block">Play now</button>
<a href="/rock-paper-scissors" className="min-w-[100px]max-h-[45px] bg-blue-500 rounded-[10px] border border-blue-400 font-bold px-3 items-center flex justify-center py-2">Play now</a>
</div>
</div>
</div>
@ -87,7 +87,7 @@ export const MainPage = () => {
<div className="flex flex-col h-full justify-between">
<div className="flex flex-row justify-between min-w-[200px] my-auto">
<span className="text-xl font-bold uppercase">Slot machine</span>
<button className="bg-blue-500 min-w-[103px] max-h-[45px] rounded-[10px] border border-blue-400 font-bold px-3 inline-block">Play now</button>
<a href="/slot" className="min-w-[100px]max-h-[45px] bg-blue-500 rounded-[10px] border border-blue-400 font-bold px-3 items-center flex justify-center py-2">Play now</a>
</div>
</div>
</div>

View file

@ -4,6 +4,8 @@ import { AppLayout } from '../components/App'
import { MainPage } from "./MainPage/MainPage.tsx";
import { NotMainPage } from "./NotMainPage/NotMainPage.tsx";
import { DiceGamePage } from './DiceGamePage/DiceGamePage.tsx';
import { RockPaperScissorsGamePage } from './RockPaperScissorsGamePage/RockPaperScissorsGamePage.tsx';
import { SlotGamePage } from './SlotGamePage/SlotGamePage.tsx';
const routes: RouteObject[] = [
{
@ -18,6 +20,14 @@ const routes: RouteObject[] = [
path: '/dice',
element: <DiceGamePage />,
},
{
path: '/rock-paper-scissors',
element: <RockPaperScissorsGamePage />,
},
{
path: '/slot',
element: <SlotGamePage />,
},
{
path: '*',
element: <Navigate replace to={'/'} />,