mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
gitbook url selected decode
This commit is contained in:
@@ -7,7 +7,9 @@ import CONFIG from '../config'
|
||||
|
||||
const BlogPostCard = ({ post, className }) => {
|
||||
const router = useRouter()
|
||||
const currentSelected = router.asPath.split('?')[0] === post?.href
|
||||
const currentSelected =
|
||||
decodeURIComponent(router.asPath.split('?')[0]) === post?.href
|
||||
|
||||
return (
|
||||
<Link href={post?.href} passHref>
|
||||
<div
|
||||
|
||||
@@ -36,7 +36,7 @@ const NavPostList = props => {
|
||||
// 默认展开一个
|
||||
const defaultOpenIndex = getDefaultOpenIndexByPath(
|
||||
categoryFolders,
|
||||
router.asPath.split('?')[0]
|
||||
decodeURIComponent(router.asPath.split('?')[0])
|
||||
)
|
||||
setExpandedGroups([defaultOpenIndex])
|
||||
}, 500)
|
||||
|
||||
Reference in New Issue
Block a user