Use current_status property for user card

This commit is contained in:
Regalijan 2023-10-22 17:24:00 -04:00
parent a4524cfea4
commit 24bbc98624
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -102,7 +102,7 @@ export default function () {
user,
}: {
history: { [k: string]: any }[];
user: { avatar: string | null; id: number; name: string };
user: { avatar: string | null; current_status: string; id: number; name: string };
} = await historyResp.json();
if (!history.length) {
@ -122,7 +122,7 @@ export default function () {
setAvatarUrl(user.avatar ?? "https://i.hep.gg/floppa");
setUid(user.id.toString());
setUsername(user.name);
setStatus(history[history.length - 1].entity.properties.action.stringValue);
setStatus(user.current_status);
for (const entry of history) {
const url = entry.entity.properties.evidence.stringValue;