Hot Fix: Debug for build

This commit is contained in:
iMax 2024-12-06 06:57:50 +01:00
parent 2b71492587
commit 75c29c719a
3 changed files with 19 additions and 6 deletions

View file

@ -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 (
<div>

View file

@ -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) {

View file

@ -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);
}