Compare commits

..

No commits in common. "bf7af89c78cacf00b38a1eb54978344a38f5d9af" and "53140da3d31e099a0ddd72fde57cfdd7a3d8a37b" have entirely different histories.

4 changed files with 7 additions and 16 deletions

View file

@ -13,11 +13,8 @@ import Secret from "./components/pages/Secret";
import Umfrage from "./components/pages/Umfrage"; import Umfrage from "./components/pages/Umfrage";
import PrivateRoute from "./auth/PrivateRoute"; import PrivateRoute from "./auth/PrivateRoute";
import Behavior from "./components/pages/Behavior"; import Behavior from "./components/pages/Behavior";
import { useAuth } from "./auth/AuthProvider";
function App() { function App() {
const [isLoggedIn] = useAuth();
isLoggedIn ? (document.title = isLoggedIn) : document.title = isLoggedIn;
return ( return (
<> <>
<Router> <Router>

View file

@ -8,7 +8,7 @@ export default function Behavior() {
let logger = new Logger({ let logger = new Logger({
//inputs: ["cursor", "wheel", "keyboard", "touch"], //inputs: ["cursor", "wheel", "keyboard", "touch"],
inputs: ["keyboard"], inputs: ["keyboard"],
// logToConsole: true, logToConsole: true,
}); });
logger.init(); logger.init();
@ -19,10 +19,10 @@ export default function Behavior() {
console.log(isLoggedIn); console.log(isLoggedIn);
if (isLoggedIn === false) { if (isLoggedIn === false) {
logger.stop(); logger.stop();
//console.log("stopped logger"); console.log("stopped logger");
} else { } else {
logger.start(); logger.start();
// console.log("start logger"); console.log("start logger");
} }
}); });
return ( return (

View file

@ -34,7 +34,7 @@ export default function Umfrage() {
const [isSkillsOk, setIsSkillsOk] = useState(""); const [isSkillsOk, setIsSkillsOk] = useState("");
/* genereal check if survey is valid */ /* genereal check if survey is valid */
const [isSurveyValid, setIsSurveyValid] = useState(true); const [isSurveyValid, setIsSurveyValid] = useState("");
const onSubmitClick = (e) => { const onSubmitClick = (e) => {
e.preventDefault(); e.preventDefault();
@ -49,14 +49,11 @@ export default function Umfrage() {
setIsGenderOk(true); setIsGenderOk(true);
setIsEducationOk(true); setIsEducationOk(true);
setIsSkillsOk(true); setIsSkillsOk(true);
setIsSurveyValid(true);
console.log("before valid");
console.log(isSurveyValid);
if (!Number(age)) { if (!Number(age)) {
setAgeErrorMessage("Das Alter muss als Zahl angegeben werden."); setAgeErrorMessage("Das Alter muss als Zahl angegeben werden.");
//setIsSurveyValid(false); setIsSurveyValid(false);
// setIsAgeOk(false); setIsAgeOk(false);
} }
if (gender === "DEFAULT" || gender === "") { if (gender === "DEFAULT" || gender === "") {
setGenderErrorMessage( setGenderErrorMessage(
@ -80,8 +77,7 @@ export default function Umfrage() {
setIsSkillsOk(false); setIsSkillsOk(false);
} }
console.log("after valid"); setIsSurveyValid(true);
console.log(isSurveyValid);
if (isSurveyValid === true) { if (isSurveyValid === true) {
authFetch("/api/protected/umfrage", { authFetch("/api/protected/umfrage", {
method: "post", method: "post",

View file

@ -13,8 +13,6 @@ export default function Lizenzen() {
Bildnachweise notiert werden. Bildnachweise notiert werden.
</p> </p>
<h2>Verwendete Bibliotheken</h2> <h2>Verwendete Bibliotheken</h2>
<h3>Backend</h3>
<h3>Frontend</h3>
<h2>Bildnachweise</h2> <h2>Bildnachweise</h2>
<ul className="bildnachweise"> <ul className="bildnachweise">
<li> <li>