✨ (history) count notes
This commit is contained in:
@@ -4,11 +4,9 @@ import { computed } from 'vue'
|
|||||||
export const useNotes = () => {
|
export const useNotes = () => {
|
||||||
const store = useUserRepoStore()
|
const store = useUserRepoStore()
|
||||||
|
|
||||||
const notes = computed(() => {
|
const notes = computed(() =>
|
||||||
console.log(store.files)
|
store.files.filter((file) => file.path?.endsWith('.md'))
|
||||||
|
)
|
||||||
return store.files
|
|
||||||
})
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
notes
|
notes
|
||||||
|
|||||||
@@ -7,7 +7,9 @@
|
|||||||
:with-content="false"
|
:with-content="false"
|
||||||
>
|
>
|
||||||
<h3 class="subtitle is-3">History</h3>
|
<h3 class="subtitle is-3">History</h3>
|
||||||
{{ notes }}
|
There are {{ notes.length }} notes
|
||||||
|
|
||||||
|
<pre>{{ notes }}</pre>
|
||||||
</flux-note>
|
</flux-note>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -28,7 +30,7 @@ export default defineComponent({
|
|||||||
repo: { type: String, required: true }
|
repo: { type: String, required: true }
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const notes = useNotes()
|
const { notes } = useNotes()
|
||||||
|
|
||||||
return { notes }
|
return { notes }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user