2021-05-27 01:07:54 +00:00
|
|
|
import React from "react";
|
|
|
|
import "../App.css";
|
|
|
|
import { Button } from "./Button";
|
|
|
|
import "./HeroSection.css";
|
2021-07-10 22:04:00 +00:00
|
|
|
import { useAuth } from "../auth/AuthProvider";
|
2021-05-25 21:40:27 +00:00
|
|
|
|
2021-07-21 00:21:40 +00:00
|
|
|
export default function HeroSection() {
|
2021-07-10 22:04:00 +00:00
|
|
|
const [isLoggedIn] = useAuth();
|
|
|
|
|
2021-05-27 01:07:54 +00:00
|
|
|
return (
|
|
|
|
<div className="hero-container">
|
|
|
|
<h1>Herzlich Willkommen</h1>
|
|
|
|
<div className="hero-btns">
|
2021-07-10 22:04:00 +00:00
|
|
|
{isLoggedIn ? (
|
2021-07-10 22:08:11 +00:00
|
|
|
<Button
|
|
|
|
className="btns"
|
|
|
|
buttonStyle="btn--primary"
|
|
|
|
buttonSize="btn--large"
|
2021-07-21 00:21:00 +00:00
|
|
|
newTo="study"
|
2021-07-10 22:08:11 +00:00
|
|
|
>
|
|
|
|
Zur Studie
|
|
|
|
</Button>
|
2021-07-10 22:04:00 +00:00
|
|
|
) : (
|
|
|
|
<>
|
|
|
|
<Button
|
|
|
|
className="btns"
|
|
|
|
buttonStyle="btn--primary"
|
|
|
|
buttonSize="btn--large"
|
|
|
|
newTo="login"
|
|
|
|
>
|
|
|
|
Einloggen (wenn du schon einmal mitgemacht hast)
|
|
|
|
</Button>
|
|
|
|
<Button
|
|
|
|
className="btns"
|
|
|
|
buttonStyle="btn--primary"
|
|
|
|
buttonSize="btn--large"
|
|
|
|
newTo="register"
|
|
|
|
>
|
|
|
|
Registrieren (falls du das erste Mal hier bist)
|
|
|
|
</Button>
|
|
|
|
</>
|
|
|
|
)}
|
2021-05-27 01:07:54 +00:00
|
|
|
<Button
|
|
|
|
className="btns"
|
|
|
|
buttonStyle="btn--primary"
|
|
|
|
buttonSize="btn--large"
|
2021-06-21 00:11:44 +00:00
|
|
|
newTo="manual"
|
2021-05-27 01:07:54 +00:00
|
|
|
>
|
2021-06-07 03:03:18 +00:00
|
|
|
Anleitung
|
2021-05-27 01:07:54 +00:00
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
2021-05-25 21:40:27 +00:00
|
|
|
}
|