mirror of
https://github.com/GithubOrgProjectPiza/frontend.git
synced 2026-09-04 08:36:08 +02:00
HahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahahaHahahahahahahahahahaha
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@
|
|||||||
"react-query": "^3.39.0",
|
"react-query": "^3.39.0",
|
||||||
"react-router": "^6.3.0",
|
"react-router": "^6.3.0",
|
||||||
"react-router-dom": "^6.3.0",
|
"react-router-dom": "^6.3.0",
|
||||||
"react-scripts": "5.0.0",
|
"react-scripts": "^5.0.1",
|
||||||
"web-vitals": "^2.1.4"
|
"web-vitals": "^2.1.4"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -3,8 +3,29 @@ import ButtonPrimary from "../Components/buttonPrimary";
|
|||||||
import Eingabefeld from "../Components/eingabefeld";
|
import Eingabefeld from "../Components/eingabefeld";
|
||||||
import bild from "../pizza_logo_dark.png";
|
import bild from "../pizza_logo_dark.png";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
|
import axios from "axios";
|
||||||
|
|
||||||
function Registrierung(props) {
|
function Registrierung(props) {
|
||||||
|
const [username, setusername] = useState();
|
||||||
|
const [password, setpassword] = useState();
|
||||||
|
const [passwordverify, setpasswordverify] = useState();
|
||||||
|
|
||||||
|
const onsubmit = ( ) => {
|
||||||
|
if(password != passwordverify) return;
|
||||||
|
|
||||||
|
axios
|
||||||
|
.post(process.env.REACT_APP_SERVER_IP + "auth/register", {
|
||||||
|
name: username,
|
||||||
|
password: password,
|
||||||
|
organization: 1,
|
||||||
|
})
|
||||||
|
.then((data) => {
|
||||||
|
console.log(data);
|
||||||
|
})
|
||||||
|
.catch((error) => console.log(error));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="sm: m-5">
|
<div class="sm: m-5">
|
||||||
<div class="flex justify-center">
|
<div class="flex justify-center">
|
||||||
@@ -16,7 +37,7 @@ function Registrierung(props) {
|
|||||||
<label class="font-medium leading-tight text-3xl mt-0 mb-2">Registrieren</label>
|
<label class="font-medium leading-tight text-3xl mt-0 mb-2">Registrieren</label>
|
||||||
<br></br>
|
<br></br>
|
||||||
<br></br>
|
<br></br>
|
||||||
<div class="grid grid-cols-2 grid-rows-2 p-0 gap-x-1 gap-y-0 h-10 md:ml-80 md:pl-20 md:mr-80 md:pr:20">
|
{/*<div class="grid grid-cols-2 grid-rows-2 p-0 gap-x-1 gap-y-0 h-10 md:ml-80 md:pl-20 md:mr-80 md:pr:20">
|
||||||
<label class="sm: col-start-1 col-end-1 row-start-1 row-end-1">Vorname:</label>
|
<label class="sm: col-start-1 col-end-1 row-start-1 row-end-1">Vorname:</label>
|
||||||
<label class="sm: col-start-2 col-end-2 row-start-1 row-end-1">Nachname:</label>
|
<label class="sm: col-start-2 col-end-2 row-start-1 row-end-1">Nachname:</label>
|
||||||
<Eingabefeld
|
<Eingabefeld
|
||||||
@@ -27,7 +48,7 @@ function Registrierung(props) {
|
|||||||
isPassword={false}
|
isPassword={false}
|
||||||
placeholder="Nachname"
|
placeholder="Nachname"
|
||||||
class="col-start-2 col-end-2 row-start-2 row-end-2"></Eingabefeld>
|
class="col-start-2 col-end-2 row-start-2 row-end-2"></Eingabefeld>
|
||||||
</div>
|
</div>*/}
|
||||||
<br></br>
|
<br></br>
|
||||||
<br></br>
|
<br></br>
|
||||||
<br></br>
|
<br></br>
|
||||||
@@ -35,29 +56,27 @@ function Registrierung(props) {
|
|||||||
<label class="">E-Mail:</label>
|
<label class="">E-Mail:</label>
|
||||||
</div>
|
</div>
|
||||||
<div className="md:flex justify-center sm:w-full">
|
<div className="md:flex justify-center sm:w-full">
|
||||||
<Eingabefeld isPassword={false} placeholder="Mail"></Eingabefeld>
|
<Eingabefeld isPassword={false} placeholder="Mail" onChange={e=>setusername(e.target.value)} value={username}></Eingabefeld>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="md:flex justify-center sm:w-full">
|
<div class="md:flex justify-center sm:w-full">
|
||||||
<label class="">Passwort:</label>
|
<label class="">Passwort:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="md:flex justify-center sm:w-full">
|
<div class="md:flex justify-center sm:w-full">
|
||||||
<Eingabefeld isPassword={true} placeholder="Passwort"></Eingabefeld>
|
<Eingabefeld isPassword={true} placeholder="Passwort" onChange={e=>setpassword(e.target.value)} value={password}></Eingabefeld>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="md:flex justify-center sm:w-full">
|
<div class="md:flex justify-center sm:w-full">
|
||||||
<label class="">Passwort erneut:</label>
|
<label class="">Passwort erneut:</label>
|
||||||
</div>
|
</div>
|
||||||
<div className="md:flex justify-center sm:w-full">
|
<div className="md:flex justify-center sm:w-full">
|
||||||
<Eingabefeld isPassword={false} placeholder="Passwort erneut"></Eingabefeld>
|
<Eingabefeld isPassword={true} placeholder="Passwort erneut" onChange={e=>setpasswordverify(e.target.value)} value={passwordverify}></Eingabefeld>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br></br>
|
<br></br>
|
||||||
<br></br>
|
<br></br>
|
||||||
<div class="sm: flex justify-between md:justify-center">
|
<div class="sm: flex justify-between md:justify-center">
|
||||||
<Link to="/">
|
<ButtonPrimary name="Registieren" onAction={onsubmit}></ButtonPrimary>
|
||||||
<ButtonPrimary name="Registieren"></ButtonPrimary>
|
|
||||||
</Link>
|
|
||||||
<Link to="/anmeldung">
|
<Link to="/anmeldung">
|
||||||
<ButtonPrimary name="Anmelden"></ButtonPrimary>
|
<ButtonPrimary name="Anmelden"></ButtonPrimary>
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
Reference in New Issue
Block a user