File tree Expand file tree Collapse file tree 4 files changed +16
-2
lines changed
packages/react-notion-x/src Expand file tree Collapse file tree 4 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ export function Block(props: BlockProps) {
8888 disableHeader
8989 } = props
9090
91+
9192 if ( ! block ) {
9293 return null
9394 }
Original file line number Diff line number Diff line change @@ -129,6 +129,10 @@ export function Asset({
129129
130130 let source =
131131 recordMap . signed_urls ?. [ block . id ] || block . properties ?. source ?. [ 0 ] ?. [ 0 ]
132+
133+ if ( block . space_id ) {
134+ source = source . concat ( '&spaceId=' , block . space_id )
135+ }
132136 let content = null
133137
134138 if ( ! source ) {
Original file line number Diff line number Diff line change @@ -12,9 +12,13 @@ export function Audio({
1212 className ?: string
1313} ) {
1414 const { recordMap } = useNotionContext ( )
15- const source =
15+
16+ let source =
1617 recordMap . signed_urls [ block . id ] || block . properties ?. source ?. [ 0 ] ?. [ 0 ]
1718
19+ if ( block . space_id ) {
20+ source = source . concat ( '&spaceId=' , block . space_id )
21+ }
1822 return (
1923 < div className = { cs ( 'notion-audio' , className ) } >
2024 < audio controls preload = 'none' src = { source } />
Original file line number Diff line number Diff line change @@ -14,9 +14,14 @@ export function File({
1414 className ?: string
1515} ) {
1616 const { components, recordMap } = useNotionContext ( )
17- const source =
17+
18+ let source =
1819 recordMap . signed_urls [ block . id ] || block . properties ?. source ?. [ 0 ] ?. [ 0 ]
1920
21+ if ( block . space_id ) {
22+ source = source . concat ( '&spaceId=' , block . space_id )
23+ }
24+
2025 return (
2126 < div className = { cs ( 'notion-file' , className ) } >
2227 < components . Link
You can’t perform that action at this time.
0 commit comments