Merge pull request 'Formatting' (#48) from formatting into main
This commit is contained in:
commit
215a86db58
13 changed files with 30 additions and 40 deletions
|
@ -8,9 +8,9 @@
|
|||
:root {
|
||||
--primary: rgb(41, 63, 87);
|
||||
--primary-contr: rgb(9, 11, 46);
|
||||
--secondary: rgb(218,218,218);
|
||||
--secondary: rgb(218, 218, 218);
|
||||
--third: rgb(171, 183, 183);
|
||||
--forth: rgb(255,255,255);
|
||||
--forth: rgb(255, 255, 255);
|
||||
}
|
||||
|
||||
.home,
|
||||
|
|
|
@ -3,7 +3,6 @@ import Navbar from "./components/Navbar";
|
|||
import "./App.css";
|
||||
import { BrowserRouter as Router, Switch, Route } from "react-router-dom";
|
||||
import Home from "./components/pages/Home";
|
||||
import SignUp from "./components/pages/SignUp";
|
||||
import Ueber from "./components/pages/Ueber";
|
||||
import Lizenzen from "./components/pages/lizenzen";
|
||||
import Privacy from "./components/pages/Privacy";
|
||||
|
@ -21,7 +20,6 @@ function App() {
|
|||
<Switch>
|
||||
<Route path="/" exact component={Home} />
|
||||
<Route path="/services" component={Ueber} />
|
||||
<Route path="/sign-up" component={SignUp} />
|
||||
<Route path="/lizenzen" component={Lizenzen} />
|
||||
<Route path="/privacy" component={Privacy} />
|
||||
<Route path="/login" component={Login} />
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
import { createAuthProvider } from "react-token-auth";
|
||||
|
||||
export const [useAuth, authFetch, login, logout] =
|
||||
createAuthProvider({
|
||||
accessTokenKey: 'access_token',
|
||||
onUpdateToken: (token) => fetch('/api/refresh', {
|
||||
method: 'POST',
|
||||
body: token.access_token
|
||||
})
|
||||
.then(r => r.json())
|
||||
})
|
||||
export const [useAuth, authFetch, login, logout] = createAuthProvider({
|
||||
accessTokenKey: "access_token",
|
||||
onUpdateToken: (token) =>
|
||||
fetch("/api/refresh", {
|
||||
method: "POST",
|
||||
body: token.access_token,
|
||||
}).then((r) => r.json()),
|
||||
});
|
||||
|
|
|
@ -14,4 +14,4 @@ const PrivateRoute = ({ component: Component, ...rest }) => {
|
|||
);
|
||||
};
|
||||
|
||||
export default PrivateRoute
|
||||
export default PrivateRoute;
|
||||
|
|
|
@ -2,7 +2,6 @@ import React from "react";
|
|||
import "./Button.css";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
|
||||
const STYLES = ["btn--primary", "btn--outline"];
|
||||
|
||||
const SIZES = ["btn--medium", "btn--large"];
|
||||
|
|
|
@ -5,7 +5,12 @@ function InputField(props) {
|
|||
return (
|
||||
<label className="input-field">
|
||||
<p>{props.LabelName}</p>
|
||||
<input name={props.InputName} onChange={props.onChange} type={props.InputType} placeholder={props.InputPlaceHolder}/>
|
||||
<input
|
||||
name={props.InputName}
|
||||
onChange={props.onChange}
|
||||
type={props.InputType}
|
||||
placeholder={props.InputPlaceHolder}
|
||||
/>
|
||||
</label>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import "./Input.css"
|
||||
import "./Button.css"
|
||||
import "./Input.css";
|
||||
import "./Button.css";
|
||||
|
||||
function SubmitField(props) {
|
||||
const InputValue = props.LabelName;
|
||||
|
|
|
@ -2,7 +2,7 @@ import React from "react";
|
|||
import "../../App.css";
|
||||
import Footer from "../../Footer";
|
||||
|
||||
export default function SignUp() {
|
||||
export default function Privacy() {
|
||||
return (
|
||||
<>
|
||||
<h1>Privacy</h1>
|
||||
|
|
|
@ -6,8 +6,8 @@ import InputField from "../InputField";
|
|||
import SubmitField from "../SubmitField";
|
||||
|
||||
export default function Login() {
|
||||
const [username, setUsername] = useState('')
|
||||
const [password, setPassword] = useState('')
|
||||
const [username, setUsername] = useState("");
|
||||
const [password, setPassword] = useState("");
|
||||
|
||||
const onSubmitClick = (e) => {
|
||||
e.preventDefault();
|
||||
|
@ -19,7 +19,7 @@ export default function Login() {
|
|||
fetch("/api/register", {
|
||||
method: "post",
|
||||
body: JSON.stringify(opts),
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
const handleUsernameChange = (e) => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { useEffect, useState } from "react/cjs/react.development";
|
||||
import {authFetch} from "../../auth/AuthProvider.js"
|
||||
import { authFetch } from "../../auth/AuthProvider.js";
|
||||
|
||||
function Secret() {
|
||||
const [message, setMessage] = useState("");
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
import React from "react";
|
||||
import "../../App.css";
|
||||
import Footer from "../../Footer";
|
||||
|
||||
export default function SignUp() {
|
||||
return (
|
||||
<>
|
||||
<h1 className="sign-up">SIGN UP</h1>
|
||||
<Footer />
|
||||
</>
|
||||
);
|
||||
}
|
|
@ -8,7 +8,8 @@ export default function Ueber() {
|
|||
<div className="sitePage">
|
||||
<h1>Über das Projekt</h1>
|
||||
<p>
|
||||
Im Rahmen meiner Bachelorthesis an der Fernfachhochschule Schweiz möchte ich der Frage nachgehen, wie sich die Verhaltensmerkmale in unterschiedlichen Situationen unterscheiden. Hierfür habe ich eine Webanwendung entwickelt, welche die Nutzerinnen und Nutzer möglichst einfach durch die Studie führt.
|
||||
Im Rahmen meiner Bachelorthesis an der Fernfachhochschule Schweiz möchte ich der Frage nachgehen, wie sich die Verhaltensmerkmale in unterschiedlichen Situationen unterscheiden. Hierfür habe ich eine Webanwendung entwickelt, welche die Nutzerinnen und Nutzer möglichst
|
||||
einfach durch die Studie führt.
|
||||
</p>
|
||||
<p>
|
||||
Falls Sie Fragen haben, können Sie diese jederzeit per Mail stellen. Gerne kann ich auch meine Disposition zur Verfügung stellen.
|
||||
|
|
Loading…
Reference in a new issue