diff --git a/themes/matery/components/ArticleCopyright.js b/themes/matery/components/ArticleCopyright.js
index e5b56411..4bd32b7e 100644
--- a/themes/matery/components/ArticleCopyright.js
+++ b/themes/matery/components/ArticleCopyright.js
@@ -6,9 +6,6 @@ import { useEffect, useState } from 'react'
import CONFIG_MATERY from '../config_matery'
export default function ArticleCopyright () {
- if (!CONFIG_MATERY.ARTICLE_COPYRIGHT) {
- return <>>
- }
const router = useRouter()
const [path, setPath] = useState(BLOG.LINK + router.asPath)
useEffect(() => {
@@ -16,6 +13,11 @@ export default function ArticleCopyright () {
})
const { locale } = useGlobal()
+
+ if (!CONFIG_MATERY.ARTICLE_COPYRIGHT) {
+ return <>>
+ }
+
return (
@@ -37,5 +39,5 @@ export default function ArticleCopyright () {
- );
+ )
}
diff --git a/themes/matery/components/ArticleInfo.js b/themes/matery/components/ArticleInfo.js
index 1a4c9a4a..666a0b0c 100644
--- a/themes/matery/components/ArticleInfo.js
+++ b/themes/matery/components/ArticleInfo.js
@@ -43,5 +43,5 @@ export const ArticleInfo = (props) => {
- );
+ )
}
diff --git a/themes/matery/components/ArticleRecommend.js b/themes/matery/components/ArticleRecommend.js
index ed87337e..67620599 100644
--- a/themes/matery/components/ArticleRecommend.js
+++ b/themes/matery/components/ArticleRecommend.js
@@ -57,9 +57,9 @@ export default function ArticleRecommend({ recommendPosts, siteInfo }) {
)
- );
+ )
})}
- );
+ )
}
diff --git a/themes/matery/components/BlogPostArchive.js b/themes/matery/components/BlogPostArchive.js
index 20887d45..226f77eb 100644
--- a/themes/matery/components/BlogPostArchive.js
+++ b/themes/matery/components/BlogPostArchive.js
@@ -42,7 +42,7 @@ const BlogPostArchive = ({ posts = [], archiveTitle }) => {
))}
- );
+ )
}
}
diff --git a/themes/matery/components/CategoryGroup.js b/themes/matery/components/CategoryGroup.js
index c88df60a..ad4e7b2a 100644
--- a/themes/matery/components/CategoryGroup.js
+++ b/themes/matery/components/CategoryGroup.js
@@ -22,10 +22,10 @@ const CategoryGroup = ({ currentCategory, categories }) => {
{category.name}({category.count})
- );
+ )
})}
- >;
+ >
}
export default CategoryGroup
diff --git a/themes/matery/components/HexoRecentComments.js b/themes/matery/components/HexoRecentComments.js
index 9c2042e6..4bdbb82f 100644
--- a/themes/matery/components/HexoRecentComments.js
+++ b/themes/matery/components/HexoRecentComments.js
@@ -39,7 +39,7 @@ const HexoRecentComments = (props) => {
)}
- );
+ )
}
export default HexoRecentComments
diff --git a/themes/matery/components/LatestPostsGroup.js b/themes/matery/components/LatestPostsGroup.js
index a6741fc2..cfb44018 100644
--- a/themes/matery/components/LatestPostsGroup.js
+++ b/themes/matery/components/LatestPostsGroup.js
@@ -57,8 +57,8 @@ const LatestPostsGroup = ({ latestPosts, siteInfo }) => {
)
- );
+ )
})}
- >;
+ >
}
export default LatestPostsGroup
diff --git a/themes/matery/components/Logo.js b/themes/matery/components/Logo.js
index 61408026..3b615c5e 100644
--- a/themes/matery/components/Logo.js
+++ b/themes/matery/components/Logo.js
@@ -10,6 +10,6 @@ const Logo = props => {
{siteInfo?.title || BLOG.TITLE}
- );
+ )
}
export default Logo
diff --git a/themes/matery/components/MenuButtonGroupTop.js b/themes/matery/components/MenuButtonGroupTop.js
index c95fc50d..4f764ded 100644
--- a/themes/matery/components/MenuButtonGroupTop.js
+++ b/themes/matery/components/MenuButtonGroupTop.js
@@ -36,12 +36,12 @@ const MenuButtonGroupTop = (props) => {
- );
+ )
} else {
return null
}
})}
- );
+ )
}
export default MenuButtonGroupTop
diff --git a/themes/matery/components/MenuGroupCard.js b/themes/matery/components/MenuGroupCard.js
index f7e674c4..9012b936 100644
--- a/themes/matery/components/MenuGroupCard.js
+++ b/themes/matery/components/MenuGroupCard.js
@@ -34,12 +34,12 @@ const MenuGroupCard = (props) => {
- );
+ )
} else {
return null
}
})}
- );
+ )
}
export default MenuGroupCard
diff --git a/themes/matery/components/MenuList.js b/themes/matery/components/MenuList.js
index c9ace3b3..d059498c 100644
--- a/themes/matery/components/MenuList.js
+++ b/themes/matery/components/MenuList.js
@@ -41,12 +41,12 @@ const MenuList = (props) => {
{link.slot}
- );
+ )
} else {
return null
}
})}
- );
+ )
}
export default MenuList
diff --git a/themes/matery/components/NavButtonGroup.js b/themes/matery/components/NavButtonGroup.js
index d490cd7b..37d448a7 100644
--- a/themes/matery/components/NavButtonGroup.js
+++ b/themes/matery/components/NavButtonGroup.js
@@ -25,9 +25,9 @@ const NavButtonGroup = (props) => {
className='text-center w-full md:mx-6 md:w-40 md:h-14 lg:h-20 h-14 justify-center items-center flex border-2 cursor-pointer rounded-lg glassmorphism hover:bg-white hover:text-black duration-200 font-bold hover:scale-110 transform'>
{category.name}
- );
+ )
})}
- );
+ )
}
export default NavButtonGroup
diff --git a/themes/matery/components/PaginationNumber.js b/themes/matery/components/PaginationNumber.js
index 0eb0b001..0ebdade7 100644
--- a/themes/matery/components/PaginationNumber.js
+++ b/themes/matery/components/PaginationNumber.js
@@ -47,7 +47,7 @@ const PaginationNumber = ({ page, totalPage }) => {
- );
+ )
}
function getPageElement(page, currentPage, pagePrefix) {
@@ -66,7 +66,7 @@ function getPageElement(page, currentPage, pagePrefix) {
{page}
)
- );
+ )
}
function generatePages(pagePrefix, page, currentPage, totalPage) {
diff --git a/themes/matery/components/PaginationSimple.js b/themes/matery/components/PaginationSimple.js
index f773eb82..6605e64c 100644
--- a/themes/matery/components/PaginationSimple.js
+++ b/themes/matery/components/PaginationSimple.js
@@ -51,7 +51,7 @@ const PaginationSimple = ({ page, totalPage }) => {
- );
+ )
}
export default PaginationSimple
diff --git a/themes/matery/components/SideBar.js b/themes/matery/components/SideBar.js
index fd89b5e0..e1a02aac 100644
--- a/themes/matery/components/SideBar.js
+++ b/themes/matery/components/SideBar.js
@@ -18,11 +18,9 @@ const SideBar = (props) => {
const defaultLinks = [
{ icon: 'fas fa-home', name: locale.NAV.INDEX, to: '/' || '/', show: true },
- { icon: 'fas fa-tag', name: locale.COMMON.TAGS, to: '/tag', 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) {
diff --git a/themes/matery/components/TagItemMiddle.js b/themes/matery/components/TagItemMiddle.js
index dd81d0ac..8da44092 100644
--- a/themes/matery/components/TagItemMiddle.js
+++ b/themes/matery/components/TagItemMiddle.js
@@ -14,7 +14,7 @@ const TagItemMiddle = ({ tag, selected = false }) => {
{tag.name + (tag.count ? `(${tag.count})` : '')}
- );
+ )
}
export default TagItemMiddle
diff --git a/themes/matery/components/TagItemMini.js b/themes/matery/components/TagItemMini.js
index 02587747..28a1d970 100644
--- a/themes/matery/components/TagItemMini.js
+++ b/themes/matery/components/TagItemMini.js
@@ -12,7 +12,7 @@ const TagItemMini = ({ tag, selected = false }) => {
{selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
- );
+ )
}
export default TagItemMini
diff --git a/themes/matery/components/TocDrawerButton.js b/themes/matery/components/TocDrawerButton.js
index 108c79e0..699bed00 100644
--- a/themes/matery/components/TocDrawerButton.js
+++ b/themes/matery/components/TocDrawerButton.js
@@ -10,10 +10,10 @@ import CONFIG_MATERY from '../config_matery'
* @constructor
*/
const TocDrawerButton = (props) => {
+ const { locale } = useGlobal()
if (!CONFIG_MATERY.WIDGET_TOC) {
return <>>
}
- const { locale } = useGlobal()
return (
)