diff --git a/frontend/components/profile/global/ProfileSidebar.vue b/frontend/components/profile/global/ProfileSidebar.vue index 3b38430..237e644 100644 --- a/frontend/components/profile/global/ProfileSidebar.vue +++ b/frontend/components/profile/global/ProfileSidebar.vue @@ -3,6 +3,16 @@ import useGetAccount from "~/composables/api/account/useGetAccount"; +// types + +type Props = { + isShow: boolean; +}; + +// props + +defineProps(); + // state const route = useRoute(); @@ -37,6 +47,14 @@ const profileLinks = ref([ }, ]); +// queries + +const { data: account, suspense } = useGetAccount(); + +await suspense(); + +// methods + const isLinkActive = (link: any) => { if (link.matchPattern) { return link.matchPattern.test(route.name); @@ -45,15 +63,16 @@ const isLinkActive = (link: any) => { } }; -// queries +// inject -const { data: account, suspense } = useGetAccount(); - -await suspense(); +const toggleSidebar = inject("toggleSidebar");