feat(chess): scaffold Vite + React app (P3.9)

This commit is contained in:
Joey Yakimowich-Payne 2026-04-16 15:54:32 -06:00
commit 0f891fa013
No known key found for this signature in database
6 changed files with 90 additions and 1 deletions

View file

@ -0,0 +1,46 @@
import { Routes, Route } from 'react-router-dom'
export function App() {
return (
<div data-testid="app-root">
<Routes>
<Route path="/" element={<Home />} />
<Route path="/game" element={<Game />} />
<Route path="/rules" element={<Rules />} />
<Route path="/save" element={<Save />} />
</Routes>
</div>
)
}
function Home() {
return (
<main data-testid="page-home">
<h1>Home</h1>
</main>
)
}
function Game() {
return (
<main data-testid="page-game">
<h1>Game</h1>
</main>
)
}
function Rules() {
return (
<main data-testid="page-rules">
<h1>Rules</h1>
</main>
)
}
function Save() {
return (
<main data-testid="page-save">
<h1>Save</h1>
</main>
)
}

View file

@ -0,0 +1 @@
@import "tailwindcss";

View file

@ -0,0 +1,17 @@
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import { BrowserRouter } from 'react-router-dom'
import './index.css'
import { App } from './App'
const container = document.getElementById('root')
if (!container) throw new Error('Failed to find the root element')
const root = createRoot(container)
root.render(
<StrictMode>
<BrowserRouter>
<App />
</BrowserRouter>
</StrictMode>
)