(notes) add routing between notes

This commit is contained in:
2021-03-13 22:11:58 +01:00
parent 2bb43ac961
commit 8fad931dfd
12 changed files with 343 additions and 65 deletions

View File

@@ -5,7 +5,7 @@
</template>
<script lang="ts">
import { defineComponent, watch, onUnmounted, nextTick } from 'vue'
import { defineComponent, watch, nextTick } from 'vue'
import { useRepo } from '@/hooks/useRepo.hook'
import { useLinks } from '@/hooks/useLinks.hook'
@@ -13,7 +13,7 @@ export default defineComponent({
name: 'Home',
setup() {
const { readme } = useRepo('jcalixte', 'notes')
const { listenToClick, removeListeners } = useLinks('note')
const { listenToClick } = useLinks('note')
watch(readme, () => {
if (readme.value) {
@@ -23,10 +23,6 @@ export default defineComponent({
}
})
onUnmounted(() => {
removeListeners()
})
return {
readme
}