diff --git a/app/favicon.ico b/app/favicon.ico deleted file mode 100644 index 718d6fe..0000000 Binary files a/app/favicon.ico and /dev/null differ diff --git a/app/fonts/GeistMonoVF.woff b/app/fonts/GeistMonoVF.woff deleted file mode 100644 index f2ae185..0000000 Binary files a/app/fonts/GeistMonoVF.woff and /dev/null differ diff --git a/app/fonts/GeistVF.woff b/app/fonts/GeistVF.woff deleted file mode 100644 index 1b62daa..0000000 Binary files a/app/fonts/GeistVF.woff and /dev/null differ diff --git a/app/globals.css b/app/globals.css deleted file mode 100644 index 13d40b8..0000000 --- a/app/globals.css +++ /dev/null @@ -1,27 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -:root { - --background: #ffffff; - --foreground: #171717; -} - -@media (prefers-color-scheme: dark) { - :root { - --background: #0a0a0a; - --foreground: #ededed; - } -} - -body { - color: var(--foreground); - background: var(--background); - font-family: Arial, Helvetica, sans-serif; -} - -@layer utilities { - .text-balance { - text-wrap: balance; - } -} diff --git a/app/index.jsx b/app/index.jsx new file mode 100644 index 0000000..437124f --- /dev/null +++ b/app/index.jsx @@ -0,0 +1,9 @@ +import Tablero from "./tablero" + +export default function HomePage(){ + return( +
+ +
+ ) +} diff --git a/app/layout.js b/app/layout.js index 9164a11..e7dbb01 100644 --- a/app/layout.js +++ b/app/layout.js @@ -1,10 +1,12 @@ -import Tablero from "./tablero" - -const totito=()=>{ - return( -
- -
- ) +export const metadata={ + title: 'Totito', + description:'generado con next.js' } -export default totito + +export default function RootKLayout({children}){ + return( + + {children} + + ) +} \ No newline at end of file diff --git a/app/tablero.js b/app/tablero.js index 7b86314..fa99432 100644 --- a/app/tablero.js +++ b/app/tablero.js @@ -1,21 +1,19 @@ -'use client' - -import { useState } from "react" +import{ usiState } from "react" import Cuadrado from "./cuadros" const Tablero =()=>{ - const [cuadros, setCuadros] = useState(Array(9).fill("")); - const [turno, setTurno]=useState('X') + const [cuadros, setCuadros]= usiState(Array(9).fill('')) + const [turno, setTuerno]=usiState('X') const pintaFigura=(indexItem)=>{ - const misCuaadros=cuadros.slice() - misCuaadros.splice(indexItem,1,turno) - setCuadros(misCuaadros) // esta linea me da problemas - - if(turno==='X'){ - setTurno('O') - }else{ - setTurno('X') + + const misCuadros= cuadros.slice() + setCuadros(misCuadros) + if(turno==='X'){ // Verifica los turnos + setTuerno('O') + } + else{ + setTuerno('X') } } return(