Commit 84b66b17 authored by Anthony Fu's avatar Anthony Fu

refactor: fix lint

parent 72f9316b
......@@ -6,7 +6,7 @@ defineProps<{
<template>
<div v-if="loading" style="text-align:center">
<Spinner />
<LoadSpinner />
</div>
<slot v-else />
</template>
......@@ -29,7 +29,7 @@ function pluralize (n: number) {
</a>
</div>
<ul v-show="open" class="comment-children">
<comment v-for="childComment in comment.comments" :key="childComment.id" :comment="childComment" />
<PostComment v-for="childComment in comment.comments" :key="childComment.id" :comment="childComment" />
</ul>
</li>
</template>
......
......@@ -115,6 +115,7 @@ export async function reactiveLoad<T> (
data.value = fetched
}
} catch (e) {
// eslint-disable-next-line no-console
console.error(e)
data.value = undefined
} finally {
......
......@@ -63,10 +63,10 @@ watch(page, (to, old) => pageChanged(to, old))
<ItemListNav :feed="feed" :page="page" :max-page="maxPage" />
<div :key="displayedPage" class="news-list">
<Spinner v-if="loading" />
<LoadSpinner v-if="loading" />
<template v-else>
<ul>
<Item v-for="item in items" :key="item.id" :item="item" />
<PostItem v-for="item in items" :key="item.id" :item="item" />
</ul>
<ItemListNav :feed="feed" :page="page" :max-page="maxPage" />
</template>
......
......@@ -15,7 +15,7 @@ useHead({
<template>
<div class="item-view view">
<div v-if="!item" class="item-view-header">
<div v-if="!item?.url" class="item-view-header">
<h1>Page not found</h1>
</div>
<template v-else>
......@@ -41,7 +41,7 @@ useHead({
{{ comments ? comments.length + ' comments' : 'No comments yet.' }}
</p>
<ul class="comment-children">
<Comment v-for="comment in comments" :key="comment.id" :comment="comment" />
<PostComment v-for="comment in comments" :key="comment.id" :comment="comment" />
</ul>
</LoadingWrapper>
</div>
......
......@@ -18,12 +18,12 @@ useHead({
<template>
<div class="user-view view">
<Spinner v-if="loading" />
<LoadSpinner v-if="loading" />
<template v-else-if="user">
<h1>User: {{ user.id }}</h1>
<ul class="meta">
<li>
<span class="label">Created:</span> {{ timeAgo(user.created_time) }} ago
<span class="label">Created:</span> {{ timeAgo(new Date(user.created_time)) }} ago
</li>
<li>
<span class="label">Karma:</span> {{ user.karma || '-' }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment