mirror of
https://github.com/d0zingcat/nextjs-notion-starter-kit.git
synced 2026-05-13 23:16:47 +00:00
fix: image fixes
This commit is contained in:
@@ -28,7 +28,10 @@ export const mapNotionImageUrl = (url: string, block: Block) => {
|
||||
}`
|
||||
|
||||
const notionImageUrlV2 = new URL(url)
|
||||
const table = block.parent_table === 'space' ? 'block' : block.parent_table
|
||||
let table = block.parent_table === 'space' ? 'block' : block.parent_table
|
||||
if (table === 'collection') {
|
||||
table = 'block'
|
||||
}
|
||||
notionImageUrlV2.searchParams.set('table', table)
|
||||
notionImageUrlV2.searchParams.set('id', block.id)
|
||||
notionImageUrlV2.searchParams.set('cache', 'v2')
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
"react-body-classname": "^1.3.1",
|
||||
"react-dom": "17.0.1",
|
||||
"react-icons": "^4.1.0",
|
||||
"react-notion-x": "^3.2.1",
|
||||
"react-notion-x": "^3.2.2",
|
||||
"react-use": "^15.3.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -4125,10 +4125,10 @@ react-modal@^3.11.2:
|
||||
react-lifecycles-compat "^3.0.0"
|
||||
warning "^4.0.3"
|
||||
|
||||
react-notion-x@^3.2.1:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/react-notion-x/-/react-notion-x-3.2.1.tgz#ac5d343131f9cb715b13f90fda0ed6714523f3fb"
|
||||
integrity sha512-Yon8LkInxm2cR2UVND+wrOWfw1W8mdbrZK5k15jUPOvIV/U0VPCmyzCTFi4e2QR4TFkRAqBKlQO3Ly07pLjXVg==
|
||||
react-notion-x@^3.2.2:
|
||||
version "3.2.2"
|
||||
resolved "https://registry.yarnpkg.com/react-notion-x/-/react-notion-x-3.2.2.tgz#de711eae90e8206dcb3db8f31b17c540a35511ad"
|
||||
integrity sha512-AegukJTMhpzL1H7hRfcSnoYRdiE3dsjI6wTOrpimOSOfeBhF46MvYchc2dYcr9ui/3cHiNP+X5mBTKgVZcHrfg==
|
||||
dependencies:
|
||||
"@matejmazur/react-katex" "^3.1.3"
|
||||
date-fns "^2.15.0"
|
||||
|
||||
Reference in New Issue
Block a user