Better auth

This commit is contained in:
2025-10-17 10:34:57 +02:00
parent 6868894a1b
commit 4876b57389
6 changed files with 186 additions and 119 deletions
-6
View File
@@ -17,12 +17,6 @@ export default function useUser() {
useEffect(() => {
async function fetchUser() {
const token = Cookies.get("token");
if (!token) {
router.push("/login");
return;
}
try {
setUser((await get("/api/profile")).data);
} catch (e: any) {