mirror of
https://git.meshkee.com/Meshkee/dashboards.git
synced 2026-08-11 22:30:58 +04:30
Fix business sidebar NavItem typing for production build.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
0a2358b0c2
commit
42cb8efc62
@@ -86,9 +86,8 @@ export function Sidebar() {
|
|||||||
return nameEn.trim() || nameFa.trim() || fallbackBusinessName
|
return nameEn.trim() || nameFa.trim() || fallbackBusinessName
|
||||||
}, [locale, nameEn, nameFa, fallbackBusinessName])
|
}, [locale, nameEn, nameFa, fallbackBusinessName])
|
||||||
|
|
||||||
const navItems = useMemo<NavItem[]>(
|
const navItems = useMemo<NavItem[]>(() => {
|
||||||
() =>
|
const items: NavItem[] = [
|
||||||
[
|
|
||||||
{ type: 'link', id: 'home', icon: Home, labelKey: 'nav.home', to: '/' },
|
{ type: 'link', id: 'home', icon: Home, labelKey: 'nav.home', to: '/' },
|
||||||
{
|
{
|
||||||
type: 'link',
|
type: 'link',
|
||||||
@@ -180,12 +179,12 @@ export function Sidebar() {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{ type: 'link', id: 'settings', icon: Settings, labelKey: 'nav.settings', to: '/settings' },
|
{ type: 'link', id: 'settings', icon: Settings, labelKey: 'nav.settings', to: '/settings' },
|
||||||
].filter(
|
]
|
||||||
(item) =>
|
|
||||||
!item.moduleId || hasBusinessModule(enabledModules, item.moduleId),
|
return items.filter(
|
||||||
),
|
(item) => !item.moduleId || hasBusinessModule(enabledModules, item.moduleId),
|
||||||
[enabledModules],
|
|
||||||
)
|
)
|
||||||
|
}, [enabledModules])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const controller = new AbortController()
|
const controller = new AbortController()
|
||||||
|
|||||||
Reference in New Issue
Block a user