mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
chore: ⬆️ Update @lysand-org/client for new types
This commit is contained in:
parent
18b4bc64b3
commit
a889f8d142
10 changed files with 19 additions and 15 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ export const useNoteData = (
|
|||
);
|
||||
|
||||
if (result?.data) {
|
||||
useEvent("note:delete", result.data as Status);
|
||||
useEvent("note:delete", result.data);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ export const useRelationship = (
|
|||
toValue(client)
|
||||
?.getRelationship(toValue(accountId) ?? "")
|
||||
.then((res) => {
|
||||
relationship.value = res.data as Relationship;
|
||||
relationship.value = res.data;
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue