♻️ (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

@@ -14,9 +14,8 @@
</template>
<script lang="ts">
import { useQueryStackedNotes } from '@/hooks/useQueryStackedNotes.hook'
import { useFolderNotes } from '@/modules/note/hooks/useFolderNotes'
import { defineAsyncComponent, defineComponent, onMounted, toRefs } from 'vue'
import { defineAsyncComponent, defineComponent } from 'vue'
const FluxNote = defineAsyncComponent(() => import('@/components/FluxNote.vue'))
@@ -31,18 +30,8 @@ export default defineComponent({
user: { type: String, required: true },
repo: { type: String, required: true }
},
setup(props) {
const refProps = toRefs(props)
const { content } = useFolderNotes(
FLEETING_NOTES_FOLDER,
refProps.user,
refProps.repo
)
const { resetStackedNotes } = useQueryStackedNotes()
onMounted(() => {
resetStackedNotes()
})
setup() {
const { content } = useFolderNotes(FLEETING_NOTES_FOLDER)
return {
content