diff --git a/themes/NEXT/Layout404.js b/themes/NEXT/Layout404.js
index 61666e00..50d9d5ce 100644
--- a/themes/NEXT/Layout404.js
+++ b/themes/NEXT/Layout404.js
@@ -5,7 +5,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faSpinner } from '@fortawesome/free-solid-svg-icons'
import { useEffect } from 'react'
-const Layout404 = () => {
+export const Layout404 = () => {
const router = useRouter()
useEffect(() => {
// 延时3秒如果加载失败就返回首页
@@ -33,5 +33,3 @@ const Layout404 = () => {
}
-
-export default Layout404
diff --git a/themes/NEXT/LayoutArchive.js b/themes/NEXT/LayoutArchive.js
index d47e39e2..9daca461 100644
--- a/themes/NEXT/LayoutArchive.js
+++ b/themes/NEXT/LayoutArchive.js
@@ -5,7 +5,7 @@ import LayoutBase from './LayoutBase'
import BlogPostArchive from './components/BlogPostArchive'
import Live2D from './components/Live2D'
-const LayoutArchive = ({ posts, tags, categories, postCount }) => {
+export const LayoutArchive = ({ posts, tags, categories, postCount }) => {
const { locale } = useGlobal()
// 深拷贝
const postsSortByDate = Object.create(posts)
@@ -63,5 +63,3 @@ const LayoutArchive = ({ posts, tags, categories, postCount }) => {
)
}
-
-export default LayoutArchive
diff --git a/themes/NEXT/LayoutCategory.js b/themes/NEXT/LayoutCategory.js
index 4b6e0089..25d6e58e 100644
--- a/themes/NEXT/LayoutCategory.js
+++ b/themes/NEXT/LayoutCategory.js
@@ -5,7 +5,7 @@ import StickyBar from './components/StickyBar'
import CategoryList from './components/CategoryList'
import BlogPostListScroll from './components/BlogPostListScroll'
-const Category = ({ tags, posts, category, categories, latestPosts, postCount }) => {
+export const LayoutCategory = ({ tags, posts, category, categories, latestPosts, postCount }) => {
const { locale } = useGlobal()
const meta = {
title: `${category} | ${locale.COMMON.CATEGORY} | ${BLOG.title}`,
@@ -21,5 +21,3 @@ const Category = ({ tags, posts, category, categories, latestPosts, postCount })
}
-
-export default Category
diff --git a/themes/NEXT/LayoutCategoryIndex.js b/themes/NEXT/LayoutCategoryIndex.js
index d545e300..8140ed4a 100644
--- a/themes/NEXT/LayoutCategoryIndex.js
+++ b/themes/NEXT/LayoutCategoryIndex.js
@@ -5,7 +5,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faFolder, faThList } from '@fortawesome/free-solid-svg-icons'
import Link from 'next/link'
-const LayoutCategoryIndex = ({
+export const LayoutCategoryIndex = ({
tags,
allPosts,
categories,
@@ -36,5 +36,3 @@ const LayoutCategoryIndex = ({
}
-
-export default LayoutCategoryIndex
diff --git a/themes/NEXT/LayoutIndex.js b/themes/NEXT/LayoutIndex.js
index ddf457c9..dfa6590b 100644
--- a/themes/NEXT/LayoutIndex.js
+++ b/themes/NEXT/LayoutIndex.js
@@ -6,7 +6,7 @@ import BlogPostListScroll from './components/BlogPostListScroll'
import BlogPostListPage from './components/BlogPostListPage'
import { CONFIG_NEXT } from './index'
-const LayoutIndex = ({ posts, tags, meta, categories, postCount, latestPosts }) => {
+export const LayoutIndex = ({ posts, tags, meta, categories, postCount, latestPosts }) => {
return }
meta={meta}
@@ -27,5 +27,3 @@ const LayoutIndex = ({ posts, tags, meta, categories, postCount, latestPosts })
)}
}
-
-export default LayoutIndex
diff --git a/themes/NEXT/LayoutPage.js b/themes/NEXT/LayoutPage.js
index 4e2f62ee..965ffc03 100644
--- a/themes/NEXT/LayoutPage.js
+++ b/themes/NEXT/LayoutPage.js
@@ -3,7 +3,7 @@ import LatestPostsGroup from './components/LatestPostsGroup'
import BlogPostListPage from './components/BlogPostListPage'
import { CONFIG_NEXT } from './index'
-const LayoutPage = ({ page, posts, tags, meta, categories, postCount, latestPosts }) => {
+export const LayoutPage = ({ page, posts, tags, meta, categories, postCount, latestPosts }) => {
return (
)
}
-
-export default LayoutPage
diff --git a/themes/NEXT/LayoutSearch.js b/themes/NEXT/LayoutSearch.js
index 1364cf63..5204b371 100644
--- a/themes/NEXT/LayoutSearch.js
+++ b/themes/NEXT/LayoutSearch.js
@@ -7,7 +7,7 @@ import { useGlobal } from '@/lib/global'
import BLOG from '@/blog.config'
import { useRouter } from 'next/router'
-const LayoutSearch = ({ posts, tags, categories, postCount }) => {
+export const LayoutSearch = ({ posts, tags, categories, postCount }) => {
let filteredPosts
const searchKey = getSearchKey()
if (searchKey) {
@@ -47,8 +47,6 @@ const LayoutSearch = ({ posts, tags, categories, postCount }) => {
)
}
-export default LayoutSearch
-
function getSearchKey () {
const router = useRouter()
if (router.query && router.query.s) {
diff --git a/themes/NEXT/LayoutSlug.js b/themes/NEXT/LayoutSlug.js
index 3fbec9db..fc7b7f01 100644
--- a/themes/NEXT/LayoutSlug.js
+++ b/themes/NEXT/LayoutSlug.js
@@ -16,7 +16,7 @@ import 'prismjs/components/prism-python'
import 'prismjs/components/prism-typescript'
import { CONFIG_NEXT } from './index'
-const LayoutSlug = ({
+export const LayoutSlug = ({
post,
tags,
prev,
@@ -74,5 +74,3 @@ const LayoutSlug = ({
)
}
-
-export default LayoutSlug
diff --git a/themes/NEXT/LayoutTag.js b/themes/NEXT/LayoutTag.js
index d0d3c291..944a1cf5 100644
--- a/themes/NEXT/LayoutTag.js
+++ b/themes/NEXT/LayoutTag.js
@@ -5,7 +5,7 @@ import StickyBar from './components/StickyBar'
import TagList from './components/TagList'
import BlogPostListScroll from './components/BlogPostListScroll'
-const LayoutTag = ({ tags, posts, tag, categories, postCount, latestPosts }) => {
+export const LayoutTag = ({ tags, posts, tag, categories, postCount, latestPosts }) => {
const { locale } = useGlobal()
const meta = {
@@ -28,5 +28,3 @@ const LayoutTag = ({ tags, posts, tag, categories, postCount, latestPosts }) =>
}
-
-export default LayoutTag
diff --git a/themes/NEXT/LayoutTagIndex.js b/themes/NEXT/LayoutTagIndex.js
index c37556ef..6400d9e1 100644
--- a/themes/NEXT/LayoutTagIndex.js
+++ b/themes/NEXT/LayoutTagIndex.js
@@ -5,7 +5,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faTags } from '@fortawesome/free-solid-svg-icons'
import TagItem from './components/TagItem'
-const LayoutTagIndex = ({ tags, categories, postCount, latestPosts }) => {
+export const LayoutTagIndex = ({ tags, categories, postCount, latestPosts }) => {
const { locale } = useGlobal()
const meta = {
title: `${locale.COMMON.TAGS} | ${BLOG.title}`,
@@ -23,4 +23,3 @@ const LayoutTagIndex = ({ tags, categories, postCount, latestPosts }) => {
}
-export default LayoutTagIndex
diff --git a/themes/NEXT/index.js b/themes/NEXT/index.js
index 49cd56d1..654baa1e 100644
--- a/themes/NEXT/index.js
+++ b/themes/NEXT/index.js
@@ -1,13 +1,13 @@
-export const LayoutIndex = import('./LayoutIndex')
-export const LayoutSearch = import('./LayoutSearch')
-export const LayoutArchive = import('./LayoutArchive')
-export const LayoutSlug = import('./LayoutSlug')
-export const Layout404 = import('./Layout404')
-export const LayoutCategory = import('./LayoutCategory')
-export const LayoutCategoryIndex = import('./LayoutCategoryIndex')
-export const LayoutPage = import('./LayoutPage')
-export const LayoutTag = import('./LayoutTag')
-export const LayoutTagIndex = import('./LayoutTagIndex')
+export { LayoutIndex } from './LayoutIndex'
+export { LayoutSearch } from './LayoutSearch'
+export { LayoutArchive } from './LayoutArchive'
+export { LayoutSlug } from './LayoutSlug'
+export { Layout404 } from './Layout404'
+export { LayoutCategory } from './LayoutCategory'
+export { LayoutCategoryIndex } from './LayoutCategoryIndex'
+export { LayoutPage } from './LayoutPage'
+export { LayoutTag } from './LayoutTag'
+export { LayoutTagIndex } from './LayoutTagIndex'
export const CONFIG_NEXT = {
// 首页相关配置