mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-31 15:10:11 +00:00
build
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import BLOG from '@/blog.config'
|
||||
import { siteConfig } from '@/lib/config'
|
||||
import { useGlobal } from '@/lib/global'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
@@ -15,7 +15,7 @@ export default function RandomPostButton(props) {
|
||||
function handleClick() {
|
||||
const randomIndex = Math.floor(Math.random() * latestPosts.length)
|
||||
const randomPost = latestPosts[randomIndex]
|
||||
router.push(`${BLOG.SUB_PATH}/${randomPost?.slug}`)
|
||||
router.push(`${siteConfig('SUB_PATH')}/${randomPost?.slug}`)
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user