From 88c317c5dbb7928b0de27538ca60d9ed68b6e090 Mon Sep 17 00:00:00 2001 From: regalijan Date: Thu, 19 Oct 2023 16:50:57 -0400 Subject: [PATCH] Implement breaking api changes --- app/routes/hammer.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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) {