Compare commits
No commits in common. "ecb06e812dc21070b675e92c81730aa31cb49a8b" and "f64406c74bac2d0cc675429e4745b42463cb5aa3" have entirely different histories.
ecb06e812d
...
f64406c74b
1 changed files with 26 additions and 34 deletions
|
@ -1,48 +1,23 @@
|
||||||
import React from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
import "../../App.css";
|
import "../../App.css";
|
||||||
import Footer from "../../Footer";
|
import Footer from "../../Footer";
|
||||||
|
import { logout, useAuth } from "../../auth/AuthProvider";
|
||||||
import InputField from "../InputField";
|
import InputField from "../InputField";
|
||||||
import SubmitField from "../SubmitField";
|
import SubmitField from "../SubmitField";
|
||||||
import { Logger } from "@behametrics/logger-web";
|
import { Logger } from "@behametrics/logger-web";
|
||||||
|
|
||||||
export default function BehaviorNormal() {
|
export default function BehaviorNormal() {
|
||||||
let username = "";
|
const [username, setUsername] = useState("");
|
||||||
const setUsername = (tmp_username) => {
|
const [password, setPassword] = useState("");
|
||||||
username = tmp_username;
|
|
||||||
};
|
|
||||||
|
|
||||||
let password = "";
|
const [isLoggedIn] = useAuth();
|
||||||
const setPassword = (tmp_password) => {
|
|
||||||
password = tmp_password;
|
|
||||||
};
|
|
||||||
|
|
||||||
let logger = new Logger({
|
|
||||||
//inputs: ["cursor", "wheel", "keyboard", "touch"],
|
|
||||||
inputs: ["keyboard"],
|
|
||||||
logToConsole: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
logger.init();
|
|
||||||
|
|
||||||
const handleOff = () => {
|
|
||||||
logger.stop();
|
|
||||||
console.log("Logger ausgeschaltet");
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleOn = () => {
|
|
||||||
logger.start();
|
|
||||||
console.log("start logging ");
|
|
||||||
};
|
|
||||||
|
|
||||||
const handlePasswordChange = (e) => {
|
|
||||||
console.log("handlePasswordChange");
|
|
||||||
setPassword(e.target.value);
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleUsernameChange = (e) => {
|
const handleUsernameChange = (e) => {
|
||||||
console.log("handleUsernamechange");
|
|
||||||
setUsername(e.target.value);
|
setUsername(e.target.value);
|
||||||
};
|
};
|
||||||
|
const handlePasswordChange = (e) => {
|
||||||
|
setPassword(e.target.value);
|
||||||
|
};
|
||||||
|
|
||||||
const handleOnCopyEvent = (e) => {
|
const handleOnCopyEvent = (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -67,6 +42,7 @@ export default function BehaviorNormal() {
|
||||||
body: JSON.stringify(opts),
|
body: JSON.stringify(opts),
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
console.log(response.status);
|
console.log(response.status);
|
||||||
|
console.log(isLoggedIn);
|
||||||
if (response.status === 401) {
|
if (response.status === 401) {
|
||||||
response.json().then((resp) => {
|
response.json().then((resp) => {
|
||||||
console.log("nicht so wirklich gut");
|
console.log("nicht so wirklich gut");
|
||||||
|
@ -80,11 +56,27 @@ export default function BehaviorNormal() {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let logger = new Logger({
|
||||||
|
//inputs: ["cursor", "wheel", "keyboard", "touch"],
|
||||||
|
inputs: ["keyboard"],
|
||||||
|
logToConsole: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const handleOff = () => {
|
||||||
|
logger.stop();
|
||||||
|
logout();
|
||||||
|
console.log("Logger ausgeschaltet");
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
logger.init().then(() => logger.start());
|
||||||
|
console.log("start logging");
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="sitePage">
|
<div className="sitePage">
|
||||||
<h1>Studie</h1>
|
<h1>Studie</h1>
|
||||||
<button onClick={handleOn}>LOGGER StaRTEN</button>
|
|
||||||
<p>
|
<p>
|
||||||
Nachfolgend werden Sie einige Schritte durchlaufen, um ihre
|
Nachfolgend werden Sie einige Schritte durchlaufen, um ihre
|
||||||
Nutzerinteraktion messen zu können. Verwenden Sie hierbei jeweils
|
Nutzerinteraktion messen zu können. Verwenden Sie hierbei jeweils
|
||||||
|
|
Loading…
Reference in a new issue