fixxxxxxxx

This commit is contained in:
2025-12-27 14:20:22 +02:00
parent 3612ada03a
commit 5bfdd7dd2b
26 changed files with 905 additions and 626 deletions

View File

@@ -12,21 +12,25 @@ export function useCurrentAccount(): UserProfileDetails | null | false {
const query = useQuery<UserProfileDetails | false>({
queryKey: ["currentAccount"],
queryFn: async () => {
const authed = await getLoggedInUser();
if (!authed) return false;
try {
const authed = await getLoggedInUser();
if (!authed) return false;
const user = await getUserByUserId(authed.id.toString());
const user = await getUserByUserId(authed.id.toString());
loadThumbnails([
{
type: "AvatarHeadShot",
targetId: authed.id,
format: "webp",
size: "720x720"
}
]).catch(() => {});
loadThumbnails([
{
type: "AvatarHeadShot",
targetId: authed.id,
format: "webp",
size: "720x720"
}
]).catch(() => {});
return user;
return user;
} catch {
return false;
}
},
staleTime: 1000 * 60 * 5,
refetchOnWindowFocus: false