(history) count notes

This commit is contained in:
Julien Calixte
2021-08-08 00:27:15 +02:00
parent b3ffb56428
commit e4a2d4d8de
2 changed files with 7 additions and 7 deletions

View File

@@ -4,11 +4,9 @@ import { computed } from 'vue'
export const useNotes = () => {
const store = useUserRepoStore()
const notes = computed(() => {
console.log(store.files)
return store.files
})
const notes = computed(() =>
store.files.filter((file) => file.path?.endsWith('.md'))
)
return {
notes

View File

@@ -7,7 +7,9 @@
:with-content="false"
>
<h3 class="subtitle is-3">History</h3>
{{ notes }}
There are {{ notes.length }} notes
<pre>{{ notes }}</pre>
</flux-note>
</div>
</template>
@@ -28,7 +30,7 @@ export default defineComponent({
repo: { type: String, required: true }
},
setup() {
const notes = useNotes()
const { notes } = useNotes()
return { notes }
}