File tree 4 files changed +16
-2
lines changed
packages/react-notion-x/src
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) {
88
88
disableHeader
89
89
} = props
90
90
91
+
91
92
if ( ! block ) {
92
93
return null
93
94
}
Original file line number Diff line number Diff line change @@ -129,6 +129,10 @@ export function Asset({
129
129
130
130
let source =
131
131
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
+ }
132
136
let content = null
133
137
134
138
if ( ! source ) {
Original file line number Diff line number Diff line change @@ -12,9 +12,13 @@ export function Audio({
12
12
className ?: string
13
13
} ) {
14
14
const { recordMap } = useNotionContext ( )
15
- const source =
15
+
16
+ let source =
16
17
recordMap . signed_urls [ block . id ] || block . properties ?. source ?. [ 0 ] ?. [ 0 ]
17
18
19
+ if ( block . space_id ) {
20
+ source = source . concat ( '&spaceId=' , block . space_id )
21
+ }
18
22
return (
19
23
< div className = { cs ( 'notion-audio' , className ) } >
20
24
< audio controls preload = 'none' src = { source } />
Original file line number Diff line number Diff line change @@ -14,9 +14,14 @@ export function File({
14
14
className ?: string
15
15
} ) {
16
16
const { components, recordMap } = useNotionContext ( )
17
- const source =
17
+
18
+ let source =
18
19
recordMap . signed_urls [ block . id ] || block . properties ?. source ?. [ 0 ] ?. [ 0 ]
19
20
21
+ if ( block . space_id ) {
22
+ source = source . concat ( '&spaceId=' , block . space_id )
23
+ }
24
+
20
25
return (
21
26
< div className = { cs ( 'notion-file' , className ) } >
22
27
< components . Link
You can’t perform that action at this time.
0 commit comments