File tree 1 file changed +2
-11
lines changed
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<
52
52
crossOrigin = "anonymous"
53
53
width = { sourceWidth }
54
54
height = { sourceHeight }
55
- onError = { ( ) => {
56
- if ( shouldUseFallback ) {
57
- setIsFallbackError ( true ) ;
58
- return ;
59
- }
60
- setIsError ( true ) ;
61
- } }
62
55
style = { {
63
56
objectFit : "contain" ,
64
57
borderWidth : 0 ,
@@ -121,10 +114,8 @@ const transformURI = (
121
114
}
122
115
123
116
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` ;
128
119
}
129
120
130
121
const params = resolveParams ( width , height ) ;
You can’t perform that action at this time.
0 commit comments