diff --git a/front/src/components/chaos/MonInput.tsx b/front/src/components/chaos/MonInput.tsx deleted file mode 100644 index 1a9bed6..0000000 --- a/front/src/components/chaos/MonInput.tsx +++ /dev/null @@ -1,10 +0,0 @@ -//import { useState } from "react"; - -export default function MonInput({text, new_focus, police}) { - - return ( -
- -
- ) -} \ No newline at end of file diff --git a/front/src/components/chaos/monButton.tsx b/front/src/components/chaos/monButton.tsx deleted file mode 100644 index 136b780..0000000 --- a/front/src/components/chaos/monButton.tsx +++ /dev/null @@ -1,19 +0,0 @@ - - - - -export default function MonButton({letter,changetext,sizeFrontw,sizeFronth,rdmFront,color}) { - - - - function clicked() {rdmFront(); - changetext(letter)} - - - - return ( -
- -
- ) -} \ No newline at end of file diff --git a/front/src/components/chaos/style.css b/front/src/components/chaos/style.css deleted file mode 100644 index f0fbe2d..0000000 --- a/front/src/components/chaos/style.css +++ /dev/null @@ -1,12 +0,0 @@ - -#keys { - display: grid; - grid-template-columns: auto auto 1fr; - - -} - -.key { - font-size: 10px; - border: solid black; -} \ No newline at end of file diff --git a/front/src/main.tsx b/front/src/main.tsx index a9d0f99..d4ac604 100644 --- a/front/src/main.tsx +++ b/front/src/main.tsx @@ -2,8 +2,6 @@ import { BrowserRouter, Route, Routes } from "react-router"; import { createRoot } from 'react-dom/client' import MainPage from "./pages/MainPage.tsx"; import GamePage from "./pages/GamePage.tsx"; -import ChaosPage from "./pages/ChaosPage.tsx"; - import ArticlePage from "./pages/ArticlePage.tsx"; import './index.css' @@ -14,7 +12,6 @@ createRoot(document.getElementById('root')!).render( } /> // Game page } /> - } /> // Article page (dynamic route) } /> // Not found diff --git a/front/src/pages/ChaosPage.tsx b/front/src/pages/ChaosPage.tsx deleted file mode 100644 index e04b7a7..0000000 --- a/front/src/pages/ChaosPage.tsx +++ /dev/null @@ -1,86 +0,0 @@ -import MonButton from "../components/chaos/monButton"; -import MonInput from "../components/chaos/MonInput"; -import "../components/chaos/style.css" -import { useState } from "react"; - - -export default function ChaosPage(){ - - const [array_letter,setArray_letter]=useState(["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"," ","!"]); - - const [sizeFrontw,setSizeFrontw] = useState(16) - const [sizeFronth,setSizeFronth] = useState(20) - const [color,setColor] = useState("#ffffff") - - function randomFront(){setSizeFronth(Math.floor(Math.random() * (1000))); - setSizeFrontw(Math.floor(Math.random() * (1000))); - setColor(`#${Math.floor(Math.random() * 16777215).toString(16)}`)} - - function shuffleArray(arr) { - for (let i = arr.length - 1; i > 0; i--) { - const j = Math.floor(Math.random() * (i + 1)); // Choisir un index aléatoire - [arr[i], arr[j]] = [arr[j], arr[i]]; // Échanger les éléments - } - return arr; - } - - - // console.log(shuffledArray); // Affiche un tableau mélangé - - - const [entry1,setEntry1] = useState("") - function E1(ent:string) { - setEntry1(entry1+ent); - } - const [connarddefocus,setFocus] = useState(()=>E1) - - const [entry2,setEntry2] = useState("") - function E2(ent:string) { - setEntry2(entry2+ent); - } - - function changeFocus(E) { - setArray_letter(shuffleArray(array_letter)); - setFocus(()=>E); - } - - const [entry3,setEntry3] = useState("") - function E3(ent:string) { - setEntry3(entry3+ent); - } - - const [tel,setTel] = useState(0) - - - return( -
-

Chaos Page

-

Quel est votre nom ?

- changeFocus(E1)} police={""}/> -

Quel adjectif désigne le mieux Xi Junpin ?

- changeFocus(E2)} police={""}/> -

Combien font 1+1 ?

- changeFocus(E3)} police={"Wingdings"}/> -
- {array_letter.map((letter) => {return })} -
-
- Formulaire super mega bien - - - - - - - setTel(parseInt(e.target.value))}/> - -
-
- ) -} \ No newline at end of file