mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
feature:
修复编译异常
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import { useRouter } from 'next/router'
|
||||
import { useEffect } from 'react'
|
||||
|
||||
/**
|
||||
* 空白博客 列表
|
||||
|
||||
@@ -17,13 +17,9 @@ const Pagination = ({ page, showNext }) => {
|
||||
return (
|
||||
<div className='my-10 flex justify-between font-medium text-black dark:text-gray-100 space-x-2'>
|
||||
<Link
|
||||
href={
|
||||
{
|
||||
pathname: (currentPage - 1 === 1 ? `${BLOG.path || '/'}` : `/page/${currentPage - 1}`),
|
||||
query: router.query.s ? { s: router.query.s } : {}
|
||||
}
|
||||
}
|
||||
>
|
||||
href={ {
|
||||
pathname: (currentPage - 1 === 1 ? `${BLOG.path || '/'}` : `/page/${currentPage - 1}`), query: router.query.s ? { s: router.query.s } : {}
|
||||
} } passHref >
|
||||
<button
|
||||
rel='prev'
|
||||
className={`${currentPage === 1 ? 'invisible' : 'block'} w-full duration-200 px-4 py-2 hover:border-black border-b-2 hover:font-bold`}
|
||||
@@ -31,12 +27,7 @@ const Pagination = ({ page, showNext }) => {
|
||||
← {locale.PAGINATION.PREV}
|
||||
</button>
|
||||
</Link>
|
||||
<Link href={
|
||||
{
|
||||
pathname: `/page/${currentPage + 1}`,
|
||||
query: router.query.s ? { s: router.query.s } : {}
|
||||
}
|
||||
}>
|
||||
<Link href={ { pathname: `/page/${currentPage + 1}`, query: router.query.s ? { s: router.query.s } : {} } } passHref>
|
||||
<button
|
||||
rel='next'
|
||||
className={`${+showNext ? 'block' : 'invisible'} w-full duration-200 px-4 py-2 hover:border-black border-b-2 hover:font-bold`}
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
faWeibo,
|
||||
faWeixin
|
||||
} from '@fortawesome/free-brands-svg-icons'
|
||||
import { faLink, faStar } from '@fortawesome/free-solid-svg-icons'
|
||||
import { faLink } from '@fortawesome/free-solid-svg-icons'
|
||||
|
||||
const ShareBar = ({ post }) => {
|
||||
const router = useRouter()
|
||||
|
||||
@@ -89,7 +89,7 @@ const BaseLayout = ({
|
||||
<Footer />
|
||||
|
||||
<JumpToTopButton targetRef={targetRef} showPercent={true} />
|
||||
<div className='hidden lg:block fixed right-5 bottom-52 py-2 px-2.5 rounded-full
|
||||
<div className='hidden lg:block fixed right-5 bottom-52 py-1.5 px-2.5 rounded-full
|
||||
bg-white text-black shadow-card dark:border-gray-500 dark:bg-gray-700 dark:text-white'>
|
||||
<DarkModeButton />
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export default function getMetadata(rawMetadata) {
|
||||
export default function getMetadata (rawMetadata) {
|
||||
const metadata = {
|
||||
locked: rawMetadata?.format?.block_locked,
|
||||
page_full_width: rawMetadata?.format?.page_full_width,
|
||||
|
||||
@@ -5,8 +5,7 @@ const indentLevels = {
|
||||
sub_sub_header: 2
|
||||
}
|
||||
|
||||
|
||||
export const getPageTableOfContents = (page,recordMap)=> {
|
||||
export const getPageTableOfContents = (page, recordMap) => {
|
||||
// 获取 header sub_header sub_sub_header
|
||||
const toc = (page.content ?? [])
|
||||
.map((blockId) => {
|
||||
@@ -66,4 +65,4 @@ export const getPageTableOfContents = (page,recordMap)=> {
|
||||
}
|
||||
|
||||
return toc
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// eslint-disable-next-line @next/next/no-document-import-in-page
|
||||
import Document, { Html, Head, Main, NextScript } from 'next/document'
|
||||
import BLOG from '@/blog.config'
|
||||
import ThirdPartyScript from '@/components/ThirdPartyScript'
|
||||
|
||||
Reference in New Issue
Block a user