small improvement
This commit is contained in:
@@ -62,7 +62,10 @@ const references = computed<Note[]>(() => {
|
||||
</div>
|
||||
<hr class="my-3" />
|
||||
<div class="flex text-sm text-secondary">
|
||||
<span>{{ note.wordCount }} words</span>
|
||||
<span
|
||||
>{{ note.wordCount }}
|
||||
{{ note.wordCount === 1 ? 'word' : 'words' }}</span
|
||||
>
|
||||
<span class="ml-auto">Last modified {{ formatDate(note.modified) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -12,7 +12,7 @@ export const notes = computed<Note[]>(() => {
|
||||
return Object.entries(baseNotes)
|
||||
.map(([_, note]) => ({
|
||||
...note,
|
||||
wordCount: note.content.split(' ').length,
|
||||
wordCount: note.content.split(' ').length - 1,
|
||||
}))
|
||||
.sort((a, b) => b.modified - a.modified) as Note[]
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user