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

refactor: fix lint

parent 72f9316b
...@@ -6,7 +6,7 @@ defineProps<{ ...@@ -6,7 +6,7 @@ defineProps<{
<template> <template>
<div v-if="loading" style="text-align:center"> <div v-if="loading" style="text-align:center">
<Spinner /> <LoadSpinner />
</div> </div>
<slot v-else /> <slot v-else />
</template> </template>
...@@ -29,7 +29,7 @@ function pluralize (n: number) { ...@@ -29,7 +29,7 @@ function pluralize (n: number) {
</a> </a>
</div> </div>
<ul v-show="open" class="comment-children"> <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> </ul>
</li> </li>
</template> </template>
......
...@@ -115,6 +115,7 @@ export async function reactiveLoad<T> ( ...@@ -115,6 +115,7 @@ export async function reactiveLoad<T> (
data.value = fetched data.value = fetched
} }
} catch (e) { } catch (e) {
// eslint-disable-next-line no-console
console.error(e) console.error(e)
data.value = undefined data.value = undefined
} finally { } finally {
......
...@@ -63,10 +63,10 @@ watch(page, (to, old) => pageChanged(to, old)) ...@@ -63,10 +63,10 @@ watch(page, (to, old) => pageChanged(to, old))
<ItemListNav :feed="feed" :page="page" :max-page="maxPage" /> <ItemListNav :feed="feed" :page="page" :max-page="maxPage" />
<div :key="displayedPage" class="news-list"> <div :key="displayedPage" class="news-list">
<Spinner v-if="loading" /> <LoadSpinner v-if="loading" />
<template v-else> <template v-else>
<ul> <ul>
<Item v-for="item in items" :key="item.id" :item="item" /> <PostItem v-for="item in items" :key="item.id" :item="item" />
</ul> </ul>
<ItemListNav :feed="feed" :page="page" :max-page="maxPage" /> <ItemListNav :feed="feed" :page="page" :max-page="maxPage" />
</template> </template>
......
...@@ -15,7 +15,7 @@ useHead({ ...@@ -15,7 +15,7 @@ useHead({
<template> <template>
<div class="item-view view"> <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> <h1>Page not found</h1>
</div> </div>
<template v-else> <template v-else>
...@@ -41,7 +41,7 @@ useHead({ ...@@ -41,7 +41,7 @@ useHead({
{{ comments ? comments.length + ' comments' : 'No comments yet.' }} {{ comments ? comments.length + ' comments' : 'No comments yet.' }}
</p> </p>
<ul class="comment-children"> <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> </ul>
</LoadingWrapper> </LoadingWrapper>
</div> </div>
......
...@@ -18,12 +18,12 @@ useHead({ ...@@ -18,12 +18,12 @@ useHead({
<template> <template>
<div class="user-view view"> <div class="user-view view">
<Spinner v-if="loading" /> <LoadSpinner v-if="loading" />
<template v-else-if="user"> <template v-else-if="user">
<h1>User: {{ user.id }}</h1> <h1>User: {{ user.id }}</h1>
<ul class="meta"> <ul class="meta">
<li> <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>
<li> <li>
<span class="label">Karma:</span> {{ user.karma || '-' }} <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