""auth"" working nicely
This commit is contained in:
@@ -5,6 +5,7 @@ import "virtual:uno.css";
|
||||
import pkg from "../package.json";
|
||||
import "./style.css";
|
||||
import api from "./api";
|
||||
import Cookies from "js-cookie";
|
||||
|
||||
const Profile = () => {
|
||||
let dialogRef!: HTMLDialogElement;
|
||||
@@ -59,4 +60,7 @@ const App = () => (
|
||||
</Router>
|
||||
);
|
||||
|
||||
render(App, document.getElementById("app")!);
|
||||
// todo: fix this
|
||||
(Cookies.get("token") == null ? api.whoami.post() : Promise.resolve()).then(
|
||||
() => render(App, document.getElementById("app")!)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user