File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -52,13 +52,6 @@ export const OptimizedImage: React.FC<
5252 crossOrigin = "anonymous"
5353 width = { sourceWidth }
5454 height = { sourceHeight }
55- onError = { ( ) => {
56- if ( shouldUseFallback ) {
57- setIsFallbackError ( true ) ;
58- return ;
59- }
60- setIsError ( true ) ;
61- } }
6255 style = { {
6356 objectFit : "contain" ,
6457 borderWidth : 0 ,
@@ -121,10 +114,8 @@ const transformURI = (
121114 }
122115
123116 if ( uri ?. startsWith ( "ipfs://" ) ) {
124- // FIXME: passing the gateway token here is unsafe and people could rip our cap but the host origin method seems broken atm
125- const gatewayAccessToken =
126- "0Ik-SBA6O3xxcvHBRmD526aG06EEwIqwcr14MFfFveyotZmOI4v9gLfJgHW3SRFY" ;
127- return `https://teritori.mypinata.cloud/ipfs/${ uri . substring ( "ipfs://" . length ) } ?img-width=${ Math . round ( width ) } &img-height=${ Math . round ( height ) } &img-fit=contain&pinataGatewayToken=${ gatewayAccessToken } ` ;
117+ // XXX: allow passing a dev token
118+ return `https://teritori.mypinata.cloud/ipfs/${ uri . substring ( "ipfs://" . length ) } ?img-width=${ Math . round ( width ) } &img-height=${ Math . round ( height ) } &img-fit=contain` ;
128119 }
129120
130121 const params = resolveParams ( width , height ) ;
You can’t perform that action at this time.
0 commit comments