Skip to content

Commit

Permalink
fix: endpointを最初一度だけ呼び出すように
Browse files Browse the repository at this point in the history
  • Loading branch information
noridev committed Sep 23, 2023
1 parent 686f1f8 commit 9f8e758
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions packages/frontend/src/components/MkNoteDetailed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -659,12 +659,14 @@ function blur() {
el.value.blur();
}

os.api('notes/children', {
noteId: appearNote.id,
limit: 4,
}).then(res => {
replies.value = res;
});
function loadRepliesSimple() {
os.api('notes/children', {
noteId: appearNote.id,
limit: 4,
}).then(res => {
replies.value = res;
});
}

const repliesLoaded = ref(false);
function loadReplies() {
Expand All @@ -686,6 +688,10 @@ function loadConversation() {
conversation.value = res.reverse();
});
}

onMounted(() => {
loadRepliesSimple();
});
</script>

<style lang="scss" module>
Expand Down

0 comments on commit 9f8e758

Please sign in to comment.