♻️ (store) use a store to store readme and files

This commit is contained in:
2021-03-24 21:23:23 +01:00
parent 165cfb96e7
commit e199c68d68
18 changed files with 202 additions and 229 deletions

View File

@@ -6,13 +6,7 @@
</template>
<script lang="ts">
import {
defineComponent,
defineAsyncComponent,
computed,
toRefs,
watch
} from 'vue'
import { defineComponent, defineAsyncComponent, computed } from 'vue'
import { useQueryStackedNotes } from '@/hooks/useQueryStackedNotes.hook'
const FluxNote = defineAsyncComponent(() => import('@/components/FluxNote.vue'))
@@ -32,13 +26,8 @@ export default defineComponent({
repo: { type: String, required: false, default: '' }
},
setup(props) {
const refProps = toRefs(props)
const { resetStackedNotes } = useQueryStackedNotes()
watch([refProps.user, refProps.repo], () => {
resetStackedNotes()
})
return {
resetStackedNotes,
routeKey: computed(() => `${props.user}-${props.repo}`)