split home page and flux note page

This commit is contained in:
Julien Calixte
2023-08-06 18:58:59 +02:00
parent 47b4adc576
commit af421042ad
9 changed files with 44 additions and 41 deletions

View File

@@ -1,28 +1,13 @@
<script setup lang="ts">
import AuthorizeUser from '@/components/AuthorizeUser.vue'
import { useComputeBacklinks } from '@/hooks/useComputeBacklinks.hook'
import { useQueryStackedNotes } from '@/hooks/useQueryStackedNotes.hook'
import { computed, defineAsyncComponent } from 'vue'
const FluxNote = defineAsyncComponent(() => import('@/components/FluxNote.vue'))
const WelcomeWorld = defineAsyncComponent(
() => import('@/components/WelcomeWorld.vue')
)
const props = defineProps<{ user?: string; repo?: string }>()
useQueryStackedNotes()
useComputeBacklinks()
const routeKey = computed(() => `${props.user}-${props.repo}`)
import WelcomeWorld from '@/components/WelcomeWorld.vue'
</script>
<template>
<div v-if="!user || !repo" class="home content">
<div class="home content">
<authorize-user class="authorize" />
<welcome-world />
</div>
<flux-note v-else :key="routeKey" :user="user" :repo="repo" />
</template>
<style lang="scss" scoped>