generated from lucien/actix-react-template
Hot Fix: Debug for build
This commit is contained in:
parent
2b71492587
commit
75c29c719a
3 changed files with 19 additions and 6 deletions
|
@ -1,6 +1,12 @@
|
||||||
//import { useState } from "react";
|
//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 (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -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}: MonButtonProps) {
|
||||||
|
|
||||||
export default function MonButton({letter,changetext,sizeFrontw,sizeFronth,rdmFront,color}) {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ export default function ChaosPage(){
|
||||||
setSizeFrontw(Math.floor(Math.random() * (1000)));
|
setSizeFrontw(Math.floor(Math.random() * (1000)));
|
||||||
setColor(`#${Math.floor(Math.random() * 16777215).toString(16)}`)}
|
setColor(`#${Math.floor(Math.random() * 16777215).toString(16)}`)}
|
||||||
|
|
||||||
function shuffleArray(arr) {
|
function shuffleArray(arr: string[]) {
|
||||||
for (let i = arr.length - 1; i > 0; i--) {
|
for (let i = arr.length - 1; i > 0; i--) {
|
||||||
const j = Math.floor(Math.random() * (i + 1)); // Choisir un index aléatoire
|
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
|
[arr[i], arr[j]] = [arr[j], arr[i]]; // Échanger les éléments
|
||||||
|
@ -39,7 +39,7 @@ export default function ChaosPage(){
|
||||||
setEntry2(entry2+ent);
|
setEntry2(entry2+ent);
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeFocus(E) {
|
function changeFocus(E: (ent:string)=>void) {
|
||||||
setArray_letter(shuffleArray(array_letter));
|
setArray_letter(shuffleArray(array_letter));
|
||||||
setFocus(()=>E);
|
setFocus(()=>E);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue