mirror of
https://github.com/d0zingcat/nextjs-notion-starter-kit.git
synced 2026-05-21 15:10:27 +00:00
feat: add Pdf and Equation by default; fix Pdf
This commit is contained in:
@@ -50,6 +50,12 @@ import styles from './styles.module.css'
|
||||
// }
|
||||
// )
|
||||
|
||||
const Pdf = dynamic(() => import('react-notion-x').then((notion) => notion.Pdf))
|
||||
|
||||
const Equation = dynamic(() =>
|
||||
import('react-notion-x').then((notion) => notion.Equation)
|
||||
)
|
||||
|
||||
const Tweet = dynamic(
|
||||
() => import('react-notion-x').then((notion) => notion.Tweet),
|
||||
{
|
||||
@@ -230,7 +236,9 @@ export const NotionPage: React.FC<types.PageProps> = ({
|
||||
collection: Collection,
|
||||
collectionRow: CollectionRow,
|
||||
tweet: Tweet,
|
||||
modal: Modal
|
||||
modal: Modal,
|
||||
pdf: Pdf,
|
||||
equation: Equation
|
||||
}}
|
||||
recordMap={recordMap}
|
||||
rootPageId={site.rootNotionPageId}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
"react-body-classname": "^1.3.1",
|
||||
"react-dom": "17.0.1",
|
||||
"react-icons": "^4.1.0",
|
||||
"react-notion-x": "^4.2.2",
|
||||
"react-notion-x": "^4.2.3",
|
||||
"react-use": "^15.3.3",
|
||||
"use-dark-mode": "^2.3.1"
|
||||
},
|
||||
|
||||
@@ -312,3 +312,7 @@
|
||||
border-radius: 0;
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
.notion-block-f382a57807bc40779860eb079d0144f2 .lazy-image-wrapper {
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
@@ -4110,10 +4110,10 @@ react-modal@^3.11.2:
|
||||
react-lifecycles-compat "^3.0.0"
|
||||
warning "^4.0.3"
|
||||
|
||||
react-notion-x@^4.2.2:
|
||||
version "4.2.2"
|
||||
resolved "https://registry.yarnpkg.com/react-notion-x/-/react-notion-x-4.2.2.tgz#16197818f54d418f4f272a018d8464b84b55f8bc"
|
||||
integrity sha512-W0tHCHwKVLtnZa8PK8hssxhWvvrh/yLRvfJ4DKY3HvXiYsJFt7CtTSkzMtpL915RsDxpZSLRu/o5nfgenLtSVQ==
|
||||
react-notion-x@^4.2.3:
|
||||
version "4.2.3"
|
||||
resolved "https://registry.yarnpkg.com/react-notion-x/-/react-notion-x-4.2.3.tgz#d0e4ae6677ccd3dff5be5f6918b8602dbebbf28c"
|
||||
integrity sha512-N6r0KqUPriQM2cjt6AuKOuEwJpFKIo7Kevjz2+uyErbixAjd2wvwXGHhZbq9ZRmICwunoNp0KqC9EWHeDsY2NA==
|
||||
dependencies:
|
||||
"@matejmazur/react-katex" "^3.1.3"
|
||||
date-fns "^2.15.0"
|
||||
|
||||
Reference in New Issue
Block a user