chore: ⬆️ Update @lysand-org/client for new types

This commit is contained in:
Jesse Wierzbinski 2024-06-11 15:02:30 -10:00
parent 18b4bc64b3
commit a889f8d142
No known key found for this signature in database
10 changed files with 19 additions and 15 deletions

View file

@ -106,7 +106,7 @@ export const useCurrentIdentity = (): Ref<Identity | null> => {
);
if (identities.value.length > 0) {
currentId.value = identities.value[0].id;
currentId.value = identities.value[0]?.id;
} else {
currentId.value = null;
}

View file

@ -14,7 +14,7 @@ export const useNote = (
ref(client)
.value?.getStatus(noteId)
.then((res) => {
output.value = res.data as Status;
output.value = res.data;
});
return output;

View file

@ -16,7 +16,7 @@ export const useNoteContext = (
ref(client)
.value?.getStatusContext(toValue(noteId) ?? "")
.then((res) => {
output.value = res.data as Context;
output.value = res.data;
});
});

View file

@ -58,7 +58,7 @@ export const useNoteData = (
);
if (result?.data) {
useEvent("note:delete", result.data as Status);
useEvent("note:delete", result.data);
}
};

View file

@ -18,7 +18,7 @@ export const useRelationship = (
toValue(client)
?.getRelationship(toValue(accountId) ?? "")
.then((res) => {
relationship.value = res.data as Relationship;
relationship.value = res.data;
});
});

View file

@ -49,7 +49,7 @@ export const useTimeline = <
);
if (newNotes.length > 0) {
fetchedNotes.value = [...fetchedNotes.value, ...newNotes];
nextMaxId = newNotes[newNotes.length - 1].id;
nextMaxId = newNotes[newNotes.length - 1]?.id;
for (const note of newNotes) {
fetchedNoteIds.add(note.id);
}
@ -70,7 +70,7 @@ export const useTimeline = <
);
if (newNotes.length > 0) {
fetchedNotes.value = [...newNotes, ...fetchedNotes.value];
prevMinId = newNotes[0].id;
prevMinId = newNotes[0]?.id;
for (const note of newNotes) {
fetchedNoteIds.add(note.id);
}
@ -132,7 +132,7 @@ export const useIdTimeline = <
);
if (newNotes.length > 0) {
fetchedNotes.value = [...fetchedNotes.value, ...newNotes];
nextMaxId = newNotes[newNotes.length - 1].id;
nextMaxId = newNotes[newNotes.length - 1]?.id;
for (const note of newNotes) {
fetchedNoteIds.add(note.id);
}
@ -153,7 +153,7 @@ export const useIdTimeline = <
);
if (newNotes.length > 0) {
fetchedNotes.value = [...newNotes, ...fetchedNotes.value];
prevMinId = newNotes[0].id;
prevMinId = newNotes[0]?.id;
for (const note of newNotes) {
fetchedNoteIds.add(note.id);
}