Compare commits
No commits in common. "bf7af89c78cacf00b38a1eb54978344a38f5d9af" and "53140da3d31e099a0ddd72fde57cfdd7a3d8a37b" have entirely different histories.
bf7af89c78
...
53140da3d3
4 changed files with 7 additions and 16 deletions
|
@ -13,11 +13,8 @@ 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 (
|
||||
<>
|
||||
<Router>
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -34,7 +34,7 @@ export default function Umfrage() {
|
|||
const [isSkillsOk, setIsSkillsOk] = useState("");
|
||||
|
||||
/* genereal check if survey is valid */
|
||||
const [isSurveyValid, setIsSurveyValid] = useState(true);
|
||||
const [isSurveyValid, setIsSurveyValid] = useState("");
|
||||
|
||||
const onSubmitClick = (e) => {
|
||||
e.preventDefault();
|
||||
|
@ -49,14 +49,11 @@ 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(
|
||||
|
@ -80,8 +77,7 @@ export default function Umfrage() {
|
|||
setIsSkillsOk(false);
|
||||
}
|
||||
|
||||
console.log("after valid");
|
||||
console.log(isSurveyValid);
|
||||
setIsSurveyValid(true);
|
||||
if (isSurveyValid === true) {
|
||||
authFetch("/api/protected/umfrage", {
|
||||
method: "post",
|
||||
|
|
|
@ -13,8 +13,6 @@ export default function Lizenzen() {
|
|||
Bildnachweise notiert werden.
|
||||
</p>
|
||||
<h2>Verwendete Bibliotheken</h2>
|
||||
<h3>Backend</h3>
|
||||
<h3>Frontend</h3>
|
||||
<h2>Bildnachweise</h2>
|
||||
<ul className="bildnachweise">
|
||||
<li>
|
||||
|
|
Loading…
Reference in a new issue