docs: fix after inject refactor

This commit is contained in:
Benjamin Canac
2023-07-29 20:30:32 +02:00
parent 3b183ac9cd
commit 5cf3bcf32d

View File

@@ -1,14 +1,14 @@
<script setup>
const commandPaletteRef = ref()
const navigation = inject('navigation')
const links = inject('links')
const { data: files } = await useLazyAsyncData('search', () => queryContent().where({ _type: 'markdown' }).find(), { default: () => [] })
const groups = computed(() => navigation.value.map(item => ({
key: item._path,
label: item.title,
commands: files.value.filter(file => file._path.startsWith(item._path)).map(file => ({
const groups = computed(() => links.value.map(item => ({
key: item.to,
label: item.label,
commands: files.value.filter(file => file._path.startsWith(item.to)).map(file => ({
id: file._id,
icon: 'i-heroicons-document',
title: file.navigation?.title || file.title,