""auth"" working nicely

This commit is contained in:
2025-08-17 19:32:01 -04:00
parent c755b83d3d
commit ef5a5e059a
5 changed files with 44 additions and 42 deletions

View File

@@ -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")!)
);