diff --git a/front/src/components/chaos/MonInput.tsx b/front/src/components/chaos/MonInput.tsx
index 1a9bed6..ae96388 100644
--- a/front/src/components/chaos/MonInput.tsx
+++ b/front/src/components/chaos/MonInput.tsx
@@ -1,6 +1,12 @@
//import { useState } from "react";
-export default function MonInput({text, new_focus, police}) {
+interface MonInputProps {
+ text: string;
+ new_focus: () => void;
+ police: string;
+}
+
+export default function MonInput({text, new_focus, police}: MonInputProps) {
return (
diff --git a/front/src/components/chaos/monButton.tsx b/front/src/components/chaos/monButton.tsx
index 136b780..e06033f 100644
--- a/front/src/components/chaos/monButton.tsx
+++ b/front/src/components/chaos/monButton.tsx
@@ -1,8 +1,15 @@
+interface MonButtonProps {
+ letter: string;
+ changetext: (arg0: string) => void;
+ sizeFrontw: number;
+ sizeFronth: number;
+ rdmFront: () => void;
+ color: string;
+}
+
-
-
-export default function MonButton({letter,changetext,sizeFrontw,sizeFronth,rdmFront,color}) {
+export default function MonButton({letter,changetext,sizeFrontw,sizeFronth,rdmFront,color}: MonButtonProps) {
diff --git a/front/src/pages/ChaosPage.tsx b/front/src/pages/ChaosPage.tsx
index e04b7a7..9efc84b 100644
--- a/front/src/pages/ChaosPage.tsx
+++ b/front/src/pages/ChaosPage.tsx
@@ -16,7 +16,7 @@ export default function ChaosPage(){
setSizeFrontw(Math.floor(Math.random() * (1000)));
setColor(`#${Math.floor(Math.random() * 16777215).toString(16)}`)}
- function shuffleArray(arr) {
+ function shuffleArray(arr: string[]) {
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
@@ -39,7 +39,7 @@ export default function ChaosPage(){
setEntry2(entry2+ent);
}
- function changeFocus(E) {
+ function changeFocus(E: (ent:string)=>void) {
setArray_letter(shuffleArray(array_letter));
setFocus(()=>E);
}