mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-01 07:26:47 +00:00
slug调整 兼容commerce主题
This commit is contained in:
@@ -1,18 +1,22 @@
|
||||
import { siteConfig } from '@/lib/config'
|
||||
import { useGlobal } from '@/lib/global'
|
||||
import CONFIG from '../config'
|
||||
import { MenuItemCollapse } from './MenuItemCollapse'
|
||||
import { siteConfig } from '@/lib/config'
|
||||
|
||||
export const MenuBarMobile = (props) => {
|
||||
export const MenuBarMobile = props => {
|
||||
const { customMenu, customNav } = props
|
||||
const { locale } = useGlobal()
|
||||
|
||||
let links = [
|
||||
// { name: locale.NAV.INDEX, to: '/' || '/', show: true },
|
||||
{ name: locale.COMMON.CATEGORY, to: '/category', show: CONFIG.MENU_CATEGORY },
|
||||
{ name: locale.COMMON.TAGS, to: '/tag', show: CONFIG.MENU_TAG },
|
||||
{ name: locale.NAV.ARCHIVE, to: '/archive', show: CONFIG.MENU_ARCHIVE }
|
||||
// { name: locale.NAV.SEARCH, to: '/search', show: CONFIG.MENU_SEARCH }
|
||||
// { name: locale.NAV.INDEX, href: '/' || '/', show: true },
|
||||
{
|
||||
name: locale.COMMON.CATEGORY,
|
||||
href: '/category',
|
||||
show: CONFIG.MENU_CATEGORY
|
||||
},
|
||||
{ name: locale.COMMON.TAGS, href: '/tag', show: CONFIG.MENU_TAG },
|
||||
{ name: locale.NAV.ARCHIVE, href: '/archive', show: CONFIG.MENU_ARCHIVE }
|
||||
// { name: locale.NAV.SEARCH, href: '/search', show: CONFIG.MENU_SEARCH }
|
||||
]
|
||||
|
||||
if (customNav) {
|
||||
@@ -30,7 +34,13 @@ export const MenuBarMobile = (props) => {
|
||||
|
||||
return (
|
||||
<nav id='nav' className=' text-md'>
|
||||
{links?.map(link => <MenuItemCollapse onHeightChange={props.onHeightChange} key={link?.id} link={link}/>)}
|
||||
{links?.map(link => (
|
||||
<MenuItemCollapse
|
||||
onHeightChange={props.onHeightChange}
|
||||
key={link?.id}
|
||||
link={link}
|
||||
/>
|
||||
))}
|
||||
</nav>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user