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