Bachelorthesis_Code/frontend/src/components/pages/Behavior.js

37 lines
829 B
JavaScript
Raw Normal View History

import React, { useEffect } from "react";
import "../../App.css";
import Footer from "../../Footer";
import { Logger } from "@behametrics/logger-web";
import { useAuth } from "../../auth/AuthProvider";
export default function Behavior() {
let logger = new Logger({
//inputs: ["cursor", "wheel", "keyboard", "touch"],
inputs: ["keyboard"],
logToConsole: true,
});
logger.init();
let [isLoggedIn] = useAuth();
useEffect(() => {
document.title = `${isLoggedIn}`;
console.log(isLoggedIn);
if (isLoggedIn === false) {
logger.stop();
console.log("stopped logger");
} else {
logger.start();
console.log("start logger");
}
});
return (
<>
<div className="sitePage">
<h1>Studie Verhaltensmerkmale</h1>
</div>
<Footer />
</>
);
}