mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-25 01:10:40 +01:00
docs: update to @nuxt/content@next (#2379)
Co-authored-by: Farnabaz <farnabaz@gmail.com>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { NuxtError } from '#app'
|
||||
import colors from 'tailwindcss/colors'
|
||||
import type { ContentSearchFile } from '@nuxt/ui-pro'
|
||||
import type { NuxtError } from '#app'
|
||||
|
||||
const props = defineProps<{
|
||||
error: NuxtError
|
||||
@@ -10,11 +9,9 @@ const props = defineProps<{
|
||||
const route = useRoute()
|
||||
const appConfig = useAppConfig()
|
||||
const colorMode = useColorMode()
|
||||
const runtimeConfig = useRuntimeConfig()
|
||||
const { integrity, api } = runtimeConfig.public.content
|
||||
|
||||
const { data: navigation } = await useAsyncData('navigation', () => fetchContentNavigation(), { default: () => [] })
|
||||
const { data: files } = await useLazyFetch<ContentSearchFile[]>(`${api.baseURL}/search${integrity ? '-' + integrity : ''}`, { default: () => [] })
|
||||
const { data: navigation } = await useAsyncData('navigation', () => queryCollectionNavigation('content'))
|
||||
const { data: files } = await useAsyncData('files', () => queryCollectionSearchSections('content', { ignoredTags: ['style'] }))
|
||||
|
||||
const links = computed(() => {
|
||||
return [{
|
||||
@@ -22,7 +19,7 @@ const links = computed(() => {
|
||||
icon: 'i-heroicons-book-open',
|
||||
to: '/getting-started',
|
||||
active: route.path.startsWith('/getting-started') || route.path.startsWith('/components')
|
||||
}, ...(navigation.value.find(item => item._path === '/pro')
|
||||
}, ...(navigation.value?.find(item => item.path === '/pro')
|
||||
? [{
|
||||
label: 'Pro',
|
||||
icon: 'i-heroicons-square-3-stack-3d',
|
||||
|
||||
Reference in New Issue
Block a user