fix: resolve Next.js rendering errors, hook unhandled fetch error, theme logo layout, double header, and FastAPI multipart dependency
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user