fix: image fixes

This commit is contained in:
Travis Fischer
2021-01-17 20:38:54 -05:00
parent 23b712d4b9
commit 0f9632c6f6
3 changed files with 9 additions and 6 deletions

View File

@@ -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')

View File

@@ -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": {

View File

@@ -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"