@@ -8,7 +8,7 @@ import { useGlobal } from 'reactn';
88import './FigmaEmbed.css' ;
99
1010function FigmaEmbed ( props ) {
11- const [ config , setConfig ] = useGlobal ( " config" ) ;
11+ const [ config , setConfig ] = useGlobal ( ' config' ) ;
1212 const [ image , setImage ] = useState ( null ) ;
1313 const [ frameId , setFrameId ] = useState ( null ) ;
1414 const [ errorMessage , setErrorMessage ] = useState ( null ) ;
@@ -17,7 +17,9 @@ function FigmaEmbed(props) {
1717 // Retrieves document.
1818 useEffect ( ( ) => {
1919 if ( ! config . figma . accessToken ) {
20- setErrorMessage ( 'Missing personal access token, please visit: https://rundsk.com/tree/The-Frontend/Configuration' ) ;
20+ setErrorMessage (
21+ 'Missing personal access token, please visit: https://rundsk.com/tree/The-Frontend/Configuration'
22+ ) ;
2123 return ;
2224 }
2325 if ( ! props . document ) {
@@ -29,8 +31,8 @@ function FigmaEmbed(props) {
2931 fetch ( `https://api.figma.com/v1/files/${ props . document } ` , {
3032 method : 'GET' ,
3133 headers : new Headers ( {
32- 'X-Figma-Token' : config . figma . accessToken
33- } )
34+ 'X-Figma-Token' : config . figma . accessToken ,
35+ } ) ,
3436 } )
3537 . then ( response => {
3638 if ( response . status === 200 ) {
@@ -77,8 +79,8 @@ function FigmaEmbed(props) {
7779 return fetch ( `https://api.figma.com/v1/images/${ props . document } ?ids=${ nodeId } ` , {
7880 method : 'GET' ,
7981 headers : new Headers ( {
80- 'X-Figma-Token' : config . figma . accessToken
81- } )
82+ 'X-Figma-Token' : config . figma . accessToken ,
83+ } ) ,
8284 } )
8385 . then ( response => {
8486 if ( response . status === 200 ) {
0 commit comments