split home page and flux note page
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user