))}
@@ -51,8 +51,8 @@ const NavPostItem = props => {
} else {
return (
<>
- {group?.items?.map(post => (
-
+ {group?.items?.map((post, index) => (
+
))}
diff --git a/themes/gitbook/index.js b/themes/gitbook/index.js
index 25af5a5c6b7..34c4f05d021 100644
--- a/themes/gitbook/index.js
+++ b/themes/gitbook/index.js
@@ -10,7 +10,6 @@ import { siteConfig } from '@/lib/config'
import { useGlobal } from '@/lib/global'
import { isBrowser } from '@/lib/utils'
import { getShortId } from '@/lib/utils/pageId'
-import { Transition } from '@headlessui/react'
import dynamic from 'next/dynamic'
import Link from 'next/link'
import { useRouter } from 'next/router'
@@ -102,7 +101,7 @@ const LayoutBase = props => {
slotRight,
slotTop
} = props
- const { onLoading, fullWidth } = useGlobal()
+ const { fullWidth } = useGlobal()
const router = useRouter()
const [tocVisible, changeTocVisible] = useState(false)
const [pageNavVisible, changePageNavVisible] = useState(false)
@@ -174,7 +173,7 @@ const LayoutBase = props => {
{slotTop}
-
{
leave='transition ease-in-out duration-300 transform'
leaveFrom='opacity-100 translate-y-0'
leaveTo='opacity-0 -translate-y-16'
- unmount={false}>
- {children}
-
+ unmount={false}> */}
+ {children}
+ {/* */}
{/* Google广告 */}
diff --git a/themes/nav/components/NavPostItem.js b/themes/nav/components/NavPostItem.js
index ec27ce90ae0..d9ecde88766 100755
--- a/themes/nav/components/NavPostItem.js
+++ b/themes/nav/components/NavPostItem.js
@@ -1,6 +1,6 @@
-import BlogPostCard from './BlogPostCard'
-import { useState } from 'react'
import Collapse from '@/components/Collapse'
+import { useState } from 'react'
+import BlogPostCard from './BlogPostCard'
/**
* 导航列表
@@ -9,7 +9,7 @@ import Collapse from '@/components/Collapse'
* @returns {JSX.Element}
* @constructor
*/
-const NavPostItem = (props) => {
+const NavPostItem = props => {
const { group } = props
const [isOpen, changeIsOpen] = useState(group?.selected)
@@ -20,25 +20,37 @@ const NavPostItem = (props) => {
console.log(group)
if (group?.category) {
- return <>
-
-
{group?.category}
-
+ return (
+ <>
+
+
{group?.category}
+
+
+
+
+
+ {group?.items?.map((post, index) => (
+
+
-
- {group?.items?.map(post => (
-
))
- }
-
- >
+ ))}
+
+ >
+ )
} else {
- return <>
- {group?.items?.map(post => (
-
))
- }
- >
+ return (
+ <>
+ {group?.items?.map((post, index) => (
+
+
+
+ ))}
+ >
+ )
}
}