refactor(components): remove unused loaded injection from sidebar

This commit is contained in:
parent 294b1b0602
commit cb2d4328a8
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

@ -5,8 +5,6 @@
import { ISidebarItem } from "@models/sidebarEntry";
import { NuxtLink } from "#components";
const loaded = inject<Ref<boolean>>("loaded");
const { useToken } = theme;
const { token } = useToken();
@ -14,7 +12,7 @@
const { data: injecto } = await useApiFetch<ISidebarItem[]>("/sidebar");
let items: Ref<ItemType[]> = ref([
let items = reactive<ItemType[]>([
{
key: "important",
label: h("span", { class: "smallcaps" }, ["Pinned"]),
@ -79,26 +77,23 @@
// console.log("wtf", items)
</script>
<template>
<client-only>
<a-menu
mode="inline"
@select="
({ item, key, selectedKeys }) => {
if ((key as string).startsWith('/')) {
selState = key as string;
navigateTo(key as string);
}
<!-- <client-only>-->
<a-menu
mode="inline"
@select="
({ item, key, selectedKeys }) => {
if ((key as string).startsWith('/')) {
selState = key as string;
navigateTo(key as string);
}
"
:style="{
flexGrow: 0.8,
}"
:trigger-sub-menu-action="'click'"
v-model:active-key="selState"
:items="items"
:inline-indent="16"
>
<!-- <a-sub-menu>
}
"
:trigger-sub-menu-action="'click'"
v-model:active-key="selState"
:items="items"
:inline-indent="16"
>
<!-- <a-sub-menu>
<template #title>
<sidebar-icon>
<template #icon>
@ -126,8 +121,8 @@
</sidebar-icon>
</a-menu-item>
</a-sub-menu> -->
</a-menu>
</client-only>
</a-menu>
<!-- </client-only>-->
</template>
<style>
.smallcaps {