Skip to content

Commit

Permalink
fix: fix bug where autoAddCategoryToNavbar.showIcon cannot display icons
Browse files Browse the repository at this point in the history
  • Loading branch information
recoluan committed Nov 24, 2024
1 parent 63b23e2 commit 94af47a
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import type {
} from '../../../types'
import { computed, ComputedRef } from 'vue'

import { IconFolder, IconTag } from '@components/icons/index.js'

function resolveNavbarItem(
item: MenuLink | MenuLinkGroup | string,
): MenuLink | MenuLinkGroup {
Expand Down Expand Up @@ -54,7 +56,7 @@ export const useNavbarConfig = (): ComputedRef<Array<MenuLink | MenuGroup<MenuLi
}

if ((autoAddCategoryToNavbar as AutoAddCategoryToNavbarOptions)?.showIcon) {
parsedCategoriesData.icon = 'Folder'
parsedCategoriesData.icon = IconFolder
}

parsedData.push(parsedCategoriesData)
Expand All @@ -73,7 +75,7 @@ export const useNavbarConfig = (): ComputedRef<Array<MenuLink | MenuGroup<MenuLi
}

if ((autoAddCategoryToNavbar as AutoAddCategoryToNavbarOptions)?.showIcon) {
parsedTagsData.icon = 'Tag'
parsedTagsData.icon = IconTag
}

parsedData.push(parsedTagsData)
Expand Down

0 comments on commit 94af47a

Please sign in to comment.