Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Implement breaking api changes
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent 4a0f769 commit 88c317c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions app/routes/hammer.tsx
Expand Up @@ -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);
Expand All @@ -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) {
Expand Down

0 comments on commit 88c317c

Please sign in to comment.