diff --git a/frontend/src/App.js b/frontend/src/App.js
index fed81fe..3f5652b 100644
--- a/frontend/src/App.js
+++ b/frontend/src/App.js
@@ -13,8 +13,11 @@ import Secret from "./components/pages/Secret";
import Umfrage from "./components/pages/Umfrage";
import PrivateRoute from "./auth/PrivateRoute";
import Behavior from "./components/pages/Behavior";
+import { useAuth } from "./auth/AuthProvider";
function App() {
+ const [isLoggedIn] = useAuth();
+ isLoggedIn ? (document.title = isLoggedIn) : document.title = isLoggedIn;
return (
<>
diff --git a/frontend/src/components/pages/Behavior.js b/frontend/src/components/pages/Behavior.js
index d3e15bc..cf3886a 100644
--- a/frontend/src/components/pages/Behavior.js
+++ b/frontend/src/components/pages/Behavior.js
@@ -8,7 +8,7 @@ export default function Behavior() {
let logger = new Logger({
//inputs: ["cursor", "wheel", "keyboard", "touch"],
inputs: ["keyboard"],
- logToConsole: true,
+ // logToConsole: true,
});
logger.init();
@@ -19,10 +19,10 @@ export default function Behavior() {
console.log(isLoggedIn);
if (isLoggedIn === false) {
logger.stop();
- console.log("stopped logger");
+ //console.log("stopped logger");
} else {
logger.start();
- console.log("start logger");
+ // console.log("start logger");
}
});
return (
diff --git a/frontend/src/components/pages/Umfrage.js b/frontend/src/components/pages/Umfrage.js
index 09b2cc6..dcc2da7 100644
--- a/frontend/src/components/pages/Umfrage.js
+++ b/frontend/src/components/pages/Umfrage.js
@@ -34,7 +34,7 @@ export default function Umfrage() {
const [isSkillsOk, setIsSkillsOk] = useState("");
/* genereal check if survey is valid */
- const [isSurveyValid, setIsSurveyValid] = useState("");
+ const [isSurveyValid, setIsSurveyValid] = useState(true);
const onSubmitClick = (e) => {
e.preventDefault();
@@ -49,11 +49,14 @@ export default function Umfrage() {
setIsGenderOk(true);
setIsEducationOk(true);
setIsSkillsOk(true);
+ setIsSurveyValid(true);
+ console.log("before valid");
+ console.log(isSurveyValid);
if (!Number(age)) {
setAgeErrorMessage("Das Alter muss als Zahl angegeben werden.");
- setIsSurveyValid(false);
- setIsAgeOk(false);
+ //setIsSurveyValid(false);
+ // setIsAgeOk(false);
}
if (gender === "DEFAULT" || gender === "") {
setGenderErrorMessage(
@@ -77,7 +80,8 @@ export default function Umfrage() {
setIsSkillsOk(false);
}
- setIsSurveyValid(true);
+ console.log("after valid");
+ console.log(isSurveyValid);
if (isSurveyValid === true) {
authFetch("/api/protected/umfrage", {
method: "post",
diff --git a/frontend/src/components/pages/lizenzen.js b/frontend/src/components/pages/lizenzen.js
index 7f1c771..1bb415c 100644
--- a/frontend/src/components/pages/lizenzen.js
+++ b/frontend/src/components/pages/lizenzen.js
@@ -13,6 +13,8 @@ export default function Lizenzen() {
Bildnachweise notiert werden.
Verwendete Bibliotheken
+ Backend
+ Frontend
Bildnachweise