File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ import {BlockProps} from '../..';
44const script = document . createElement ( 'script' ) ;
55script . type = 'text/javascript' ;
66script . id = 'dropboxjs' ;
7- script . setAttribute ( 'data-app-key' , 'n933i11a8tmjp1i' ) ;
7+ const DROPBOX_APP_KEY = ( window as any ) . DROPBOX_APP_KEY ;
8+ if ( DROPBOX_APP_KEY ) script . setAttribute ( 'data-app-key' , DROPBOX_APP_KEY ) ;
89script . src = 'https://www.dropbox.com/static/api/2/dropins.js' ;
910document . body . append ( script ) ;
1011
@@ -13,9 +14,7 @@ declare const Dropbox: any;
1314const DropboxUi : React . FC < BlockProps > = ( { url, renderWrap} ) => {
1415 const ref = React . useRef ( ) ;
1516 React . useLayoutEffect ( ( ) => {
16- console . log ( 'Dropbox' , Dropbox ) ;
1717 if ( ! ref . current ) return ;
18- console . log ( 'ref.current' , ref . current ) ;
1918 const embed = ( Dropbox as any ) . embed ( {
2019 link : url ,
2120 file : {
You can’t perform that action at this time.
0 commit comments