fix: mobile layout

This commit is contained in:
Jannat Patel
2025-12-29 19:14:22 +05:30
parent 5053b4e45f
commit a497a2d838
3 changed files with 106 additions and 73 deletions

View File

@@ -80,6 +80,7 @@ onMounted(() => {
{},
{
onSuccess(data) {
destructureSidebarLinks()
filterLinksToShow(data)
addOtherLinks()
},
@@ -103,6 +104,16 @@ watch(showMenu, (val) => {
}
})
const destructureSidebarLinks = () => {
let links = []
sidebarLinks.value.forEach((link) => {
link.items?.forEach((item) => {
links.push(item)
})
})
sidebarLinks.value = links
}
const filterLinksToShow = (data) => {
Object.keys(data).forEach((key) => {
if (!parseInt(data[key])) {