✨ (history) count notes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user