frontend/RemoveUnneccessaryButtons (fix #122 and fix #123) #125

Merged
cami merged 2 commits from frontend/RemoveUnneccessaryButtons into main 2021-07-10 22:09:20 +00:00
Showing only changes of commit 4391cf790c - Show all commits

View file

@ -3,12 +3,19 @@ import "../App.css";
import { Button } from "./Button"; import { Button } from "./Button";
import "./HeroSection.css"; import "./HeroSection.css";
import "@fortawesome/fontawesome-free/css/all.css"; import "@fortawesome/fontawesome-free/css/all.css";
import { useAuth } from "../auth/AuthProvider";
function HeroSection() { function HeroSection() {
const [isLoggedIn] = useAuth();
return ( return (
<div className="hero-container"> <div className="hero-container">
<h1>Herzlich Willkommen</h1> <h1>Herzlich Willkommen</h1>
<div className="hero-btns"> <div className="hero-btns">
{isLoggedIn ? (
console.log("Logged in")
) : (
<>
<Button <Button
className="btns" className="btns"
buttonStyle="btn--primary" buttonStyle="btn--primary"
@ -25,6 +32,8 @@ function HeroSection() {
> >
Registrieren (falls du das erste Mal hier bist) Registrieren (falls du das erste Mal hier bist)
</Button> </Button>
</>
)}
<Button <Button
className="btns" className="btns"
buttonStyle="btn--primary" buttonStyle="btn--primary"