import BLOG from '@/blog.config' import { useGlobal } from '@/lib/global' import Link from 'next/link' import { useRouter } from 'next/router' import CONFIG_MATERY from '../config_matery' /** * 标签组 * @param tags * @param currentTag * @returns {JSX.Element} * @constructor */ const SideBar = (props) => { const { siteInfo, customNav } = props const { locale } = useGlobal() const router = useRouter() const defaultLinks = [ { icon: 'fas fa-home', name: locale.NAV.INDEX, to: '/' || '/', show: true }, { icon: 'fas fa-archive', name: locale.NAV.ARCHIVE, to: '/archive', show: CONFIG_MATERY.MENU_ARCHIVE }, { icon: 'fas fa-folder', name: locale.COMMON.CATEGORY, to: '/category', show: CONFIG_MATERY.MENU_CATEGORY }, { icon: 'fas fa-tag', name: locale.COMMON.TAGS, to: '/tag', show: CONFIG_MATERY.MENU_TAG } ] let links = [].concat(defaultLinks) if (customNav) { links = defaultLinks.concat(customNav) } return ( ) } export default SideBar