Working things
This commit is contained in:
parent
cf481d42e1
commit
65fcf8e4ab
1 changed files with 6 additions and 20 deletions
|
@ -1,4 +1,4 @@
|
|||
import React, { useEffect, useState } from "react";
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import "../../App.css";
|
||||
import Footer from "../../Footer";
|
||||
import InputField from "../InputField";
|
||||
|
@ -9,18 +9,17 @@ import BehaviorNormal from "../BehaviorNormal";
|
|||
import { Button } from "../Button";
|
||||
|
||||
export default function Study() {
|
||||
|
||||
var [logger, setLogger] = useState();
|
||||
const _logger = useRef(0);
|
||||
|
||||
useEffect(() => {
|
||||
logger = new Logger({
|
||||
_logger.current = new Logger({
|
||||
//inputs: ["cursor", "wheel", "keyboard", "touch"],
|
||||
inputs: ["keyboard"],
|
||||
// apiUrl: "https://behavior.marcocamenzind.ch",
|
||||
apiUrl: "http://localhost:5000",
|
||||
logToConsole: true,
|
||||
});
|
||||
logger.init();
|
||||
_logger.current.init();
|
||||
}, []);
|
||||
|
||||
let username = "";
|
||||
|
@ -33,29 +32,16 @@ export default function Study() {
|
|||
password = tmp_password;
|
||||
};
|
||||
|
||||
/*
|
||||
let isStepStart = true;
|
||||
const setIsStepStart = (tmp) => {
|
||||
isStepStart = tmp;
|
||||
};
|
||||
|
||||
let isStepNormal = false;
|
||||
const setIsStepNormal = (tmp) => {
|
||||
isStepNormal = tmp;
|
||||
};
|
||||
*/
|
||||
|
||||
const [isStepStart, setIsStepStart] = useState(true);
|
||||
const [isStepNormal, setIsStepNormal] = useState(false);
|
||||
|
||||
|
||||
const handleLoggerOff = () => {
|
||||
logger.stop();
|
||||
_logger.current.stop();
|
||||
console.log("Logger ausgeschaltet");
|
||||
};
|
||||
|
||||
const handleLoggerOn = () => {
|
||||
logger.start();
|
||||
_logger.current.start();
|
||||
console.log("start logging ");
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue