Improved auth

This commit is contained in:
2025-10-22 12:22:09 +02:00
parent 97515cca96
commit 2e4c925a2c
7 changed files with 19 additions and 26 deletions
+2 -2
View File
@@ -19,8 +19,8 @@ export default function useUser() {
async function fetchUser() {
try {
setUser((await get("/api/profile", (r) => setUser(r.data))).data);
} catch (e: any) {
router.push("/login");
} catch (e: any) {
router.push("/auth?t=login");
toast.error(`Error: ${e}`);
}
}