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