import React, { useState } from "react"; import ButtonPrimary from "../Components/buttonPrimary"; import Eingabefeld from "../Components/eingabefeld"; import bild from "../pizza_logo_dark.png"; import { Link } from "react-router-dom"; import axios from "axios"; function Anmeldepage(props) { const [username, setusername] = useState(); const [password, setpassword] = useState(); const onsubmit = () => { axios .post(process.env.REACT_APP_SERVER_IP + "auth/authenthicate", { name: username, password: password, }) .then((data) => { localStorage.setItem("token", data.data.payload.context.token); }) .catch((error) => console.log(error)); }; return (