feat(frontend): redo setup with ts+tailwind and implement auth+header

This commit is contained in:
Julian Tölle 2020-05-02 03:03:19 +02:00
parent f2065d3f1f
commit 05f230a7ce
32 changed files with 5927 additions and 2749 deletions

26
frontend/src/App.tsx Normal file
View file

@ -0,0 +1,26 @@
import React from "react";
import { Route, Switch } from "react-router-dom";
import { NavBar } from "./components/NavBar";
import { useAuth } from "./hooks/use-auth";
import "./tailwind/generated.css";
export function App() {
const { isLoaded } = useAuth();
console.log("App", { isLoaded });
if (!isLoaded) {
return <div>Loading...</div>;
}
return (
<div className="App">
<header>
<NavBar />
</header>
<Switch>
<Route path="/" exact />
</Switch>
</div>
);
}