style: 🎨 Run Biome

This commit is contained in:
Jesse Wierzbinski 2024-04-26 21:58:17 -10:00
parent 83ff97d7ff
commit 7461478170
No known key found for this signature in database
2 changed files with 25 additions and 19 deletions

View file

@ -114,18 +114,18 @@ const mentions = await useResolveMentions(
);
const eventualReblogAccountName = props.note?.reblog
? useParsedContent(
props.note?.account.display_name,
props.note?.account.emojis,
mentions.value,
).value
props.note?.account.display_name,
props.note?.account.emojis,
mentions.value,
).value
: null;
const content =
note.value && process.client
? useParsedContent(
note.value.content,
note.value.emojis,
mentions.value,
)
note.value.content,
note.value.emojis,
mentions.value,
)
: "";
const numberFormat = (number = 0) =>
new Intl.NumberFormat(undefined, {
@ -141,7 +141,7 @@ const deleteNote = async () => {
if (result?.data) {
console.log("Status deleted", result.data);
emits('delete')
emits("delete");
}
};
</script>

View file

@ -17,7 +17,7 @@
</template>
<script lang="ts" setup>
import type { Status } from '~/types/mastodon/status';
import type { Status } from "~/types/mastodon/status";
const props = defineProps<{
timeline: Status[];
@ -52,13 +52,19 @@ useIntervalFn(() => {
props.loadPrev();
}, 5000);
watch(() => props.timeline, (newTimeline, oldTimeline) => {
// If posts are deleted, don't start loading more posts
if (newTimeline.length === oldTimeline.length - 1) return;
isLoading.value = false;
// If less than NOTES_PER_PAGE statuses are returned, we have reached the end
if (newTimeline.length - oldTimeline.length < useConfig().NOTES_PER_PAGE) {
hasReachedEnd.value = true;
}
});
watch(
() => props.timeline,
(newTimeline, oldTimeline) => {
// If posts are deleted, don't start loading more posts
if (newTimeline.length === oldTimeline.length - 1) return;
isLoading.value = false;
// If less than NOTES_PER_PAGE statuses are returned, we have reached the end
if (
newTimeline.length - oldTimeline.length <
useConfig().NOTES_PER_PAGE
) {
hasReachedEnd.value = true;
}
},
);
</script>