fix: resolve Next.js rendering errors, hook unhandled fetch error, theme logo layout, double header, and FastAPI multipart dependency

This commit is contained in:
2026-07-07 13:56:32 +05:30
parent 04db17ea0e
commit 22549edcdb
5 changed files with 26 additions and 20 deletions

View File

@@ -44,7 +44,10 @@ export function useActiveUser() {
try {
const res = await fetch(`/api/users/${id}`);
if (!res.ok) {
throw new Error("Failed to fetch user profile");
console.error("Failed to fetch user profile, status:", res.status);
setError("Failed to fetch user profile");
setUser(null);
return;
}
const data = await res.json();
setUser(data);