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) => {
8888 disableHeader
8989 } = props
9090
91+ console . log ( { block } )
92+
9193 if ( ! block ) {
9294 return null
9395 }
Original file line number Diff line number Diff line change @@ -126,6 +126,10 @@ export const Asset: React.FC<{
126126
127127 let source =
128128 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+ }
129133 let content = null
130134
131135 if ( ! source ) {
Original file line number Diff line number Diff line change @@ -10,9 +10,13 @@ export const Audio: React.FC<{
1010 className ?: string
1111} > = ( { block, className } ) => {
1212 const { recordMap } = useNotionContext ( )
13- const source =
13+
14+ let source =
1415 recordMap . signed_urls [ block . id ] || block . properties ?. source ?. [ 0 ] ?. [ 0 ]
1516
17+ if ( block . space_id ) {
18+ source = source . concat ( '&spaceId=' , block . space_id )
19+ }
1620 return (
1721 < div className = { cs ( 'notion-audio' , className ) } >
1822 < 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<{
1212 className ?: string
1313} > = ( { block, className } ) => {
1414 const { components, 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+ }
22+
1823 return (
1924 < div className = { cs ( 'notion-file' , className ) } >
2025 < components . Link
You can’t perform that action at this time.
0 commit comments