diff --git a/app/routes/hammer.tsx b/app/routes/hammer.tsx index e7ca770..504c9a7 100644 --- a/app/routes/hammer.tsx +++ b/app/routes/hammer.tsx @@ -78,7 +78,13 @@ export default function () { }); } - const history: { [k: string]: any }[] = await historyResp.json(); + const { + history, + user, + }: { + history: { [k: string]: any }[]; + user: { avatar: string | null; id: number; name: string }; + } = await historyResp.json(); if (!history.length) { setLoading(false); @@ -93,7 +99,8 @@ export default function () { setHasResults(true); const cardList = []; - setUid(history[history.length - 1].entity.properties.target.integerValue); + setAvatarUrl(user.avatar ?? "https://i.hep.gg/floppa"); + setUid(user.id.toString()); setStatus(history[history.length - 1].entity.properties.action.stringValue); for (const entry of history) {