Mise à jour de 'cryptide_project/src/Components/GraphContainer.tsx'
continuous-integration/drone/push Build is passing Details

CI/CD
Thomas CHAZOT 7 months ago
parent 6c3a92cc22
commit 330a0ad525

@ -22,6 +22,9 @@ import html2canvas from 'html2canvas';
import jsPDF from 'jspdf';
import {basePath} from "../AdressSetup"
import { io } from "socket.io-client";
import { ADRESSE_WEBSERVER } from "../AdressSetup";
interface MyGraphComponentProps {
onNodeClick: (shouldShowChoiceBar: boolean) => void;
handleShowTurnBar: (shouldShowTurnBar: boolean) => void
@ -127,6 +130,20 @@ const MyGraphComponent: React.FC<MyGraphComponentProps> = ({onNodeClick, handleS
return () => clearInterval(intervalId);
}, []);
useEffect(() => {
// Démarrez le timer au montage du composant
const intervalId = setInterval(() => {
const socket2 = io(ADRESSE_WEBSERVER);
console.log(socket2.id)
}, 500);
// Nettoyez l'intervalle lorsque le composant est démonté
return () => clearInterval(intervalId);
}, []);
useEffect(() => {
testPlayers = players

Loading…
Cancel
Save