Moved Sidebar to top of app
This prevents flicker and stops useless rerender of the component
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { PhMagnifyingGlass } from '@phosphor-icons/vue';
|
||||
import type { MenuItem } from '~/components/global/SidebarProps';
|
||||
|
||||
useHead({
|
||||
title: 'Calendrier'
|
||||
@@ -17,21 +16,18 @@ watch(user, (n, _o) => {
|
||||
}
|
||||
})
|
||||
|
||||
const { setCurrentMenu } = useUiStore()
|
||||
const { revealAdvancedSearch } = useCalendar()
|
||||
|
||||
const sidebarMenu: MenuItem[] = [
|
||||
setCurrentMenu([
|
||||
{
|
||||
phIcon: PhMagnifyingGlass,
|
||||
tooltip: 'Recherche avancée',
|
||||
clickHandler: revealAdvancedSearch
|
||||
}
|
||||
]
|
||||
])
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="h-full grid grid-cols-[auto_1fr]">
|
||||
<Sidebar :menu-items="sidebarMenu" />
|
||||
|
||||
<Calendar />
|
||||
</div>
|
||||
<Calendar />
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user