@@ -106,7 +106,7 @@ const CollectionPage: NextPage<Props> = ({ id, ssr }) => {
106
106
const scrollRef = useRef < HTMLDivElement | null > ( null )
107
107
const collectionChain =
108
108
supportedChains . find (
109
- ( chain ) => router . query ?. chain === chain . routePrefix
109
+ ( chain ) => router . query ?. chain === chain . routePrefix ,
110
110
) || DefaultChain
111
111
112
112
const scrollToTop = ( ) => {
@@ -130,7 +130,7 @@ const CollectionPage: NextPage<Props> = ({ id, ssr }) => {
130
130
let collection = collections && collections [ 0 ]
131
131
132
132
const mintData = collection ?. mintStages ?. find (
133
- ( stage ) => stage . kind === 'public'
133
+ ( stage ) => stage . kind === 'public' ,
134
134
)
135
135
136
136
const mintPriceDecimal = mintData ?. price ?. amount ?. decimal
@@ -213,7 +213,7 @@ const CollectionPage: NextPage<Props> = ({ id, ssr }) => {
213
213
? reservoirEvent . data ?. market ?. floorAskNormalized ?. price ?. amount ?. native
214
214
: reservoirEvent . data ?. market ?. floorAsk ?. price ?. amount ?. native
215
215
const tokenIndex = tokens . findIndex (
216
- ( token ) => token . token ?. tokenId === reservoirEvent ?. data . token . tokenId
216
+ ( token ) => token . token ?. tokenId === reservoirEvent ?. data . token . tokenId ,
217
217
)
218
218
const token = tokenIndex > - 1 ? tokens [ tokenIndex ] : null
219
219
if ( token ) {
@@ -226,7 +226,7 @@ const CollectionPage: NextPage<Props> = ({ id, ssr }) => {
226
226
if ( ! price ) {
227
227
if ( token ) {
228
228
const endOfListingsIndex = tokens . findIndex (
229
- ( token ) => ! token . market ?. floorAsk ?. price ?. amount ?. native
229
+ ( token ) => ! token . market ?. floorAsk ?. price ?. amount ?. native ,
230
230
)
231
231
if ( endOfListingsIndex === - 1 ) {
232
232
hasChange = true
@@ -235,8 +235,8 @@ const CollectionPage: NextPage<Props> = ({ id, ssr }) => {
235
235
sortBy === 'rarity'
236
236
? tokenIndex
237
237
: endOfListingsIndex > - 1
238
- ? endOfListingsIndex
239
- : 0
238
+ ? endOfListingsIndex
239
+ : 0
240
240
newTokens . splice ( newTokenIndex , 0 , {
241
241
...token ,
242
242
market : {
@@ -301,7 +301,7 @@ const CollectionPage: NextPage<Props> = ({ id, ssr }) => {
301
301
tokens : newTokens ,
302
302
} ,
303
303
] ,
304
- }
304
+ } ,
305
305
)
306
306
}
307
307
} ,
@@ -315,7 +315,7 @@ const CollectionPage: NextPage<Props> = ({ id, ssr }) => {
315
315
}
316
316
return attributesData . data
317
317
?. filter (
318
- ( attribute ) => attribute . kind != 'number' && attribute . kind != 'range'
318
+ ( attribute ) => attribute . kind != 'number' && attribute . kind != 'range' ,
319
319
)
320
320
. sort ( ( a , b ) => a . key . localeCompare ( b . key ) )
321
321
} , [ attributesData . data ] )
@@ -328,7 +328,7 @@ const CollectionPage: NextPage<Props> = ({ id, ssr }) => {
328
328
collection ?. tokenCount &&
329
329
+ collection . tokenCount >= 2 &&
330
330
attributes &&
331
- attributes ?. length >= 2
331
+ attributes ?. length >= 2 ,
332
332
)
333
333
334
334
const hasSecurityConfig =
@@ -365,17 +365,17 @@ const CollectionPage: NextPage<Props> = ({ id, ssr }) => {
365
365
< meta property = "fc:frame" content = "vNext" />
366
366
< meta
367
367
property = "fc:frame:image"
368
- content = { collection . image || collection . banner }
368
+ content = { collection ? .image || collection ? .banner }
369
369
/>
370
370
< meta property = "fc:frame:image:aspect_ratio" content = "1:1" />
371
371
< meta property = "fc:frame:button:1" content = "Mint" />
372
372
< meta property = "fc:frame:button:1:action" content = "mint" />
373
373
< meta
374
374
property = "fc:frame:button:1:target"
375
- content = { `eip155:${ collection . chainId } :${ collection . primaryContract } ` }
375
+ content = { `eip155:${ collection ? .chainId } :${ collection ? .primaryContract } ` }
376
376
/>
377
377
378
- { collection . floorAsk ?. price ?. amount ?. native && (
378
+ { collection ? .floorAsk ?. price ?. amount ?. native && (
379
379
< >
380
380
< meta
381
381
property = "fc:frame:button:2"
@@ -973,7 +973,7 @@ export const getServerSideProps: GetServerSideProps<{
973
973
const collectionsPromise = fetcher (
974
974
`${ reservoirBaseUrl } /collections/v7` ,
975
975
collectionQuery ,
976
- headers
976
+ headers ,
977
977
)
978
978
979
979
let tokensQuery : paths [ '/tokens/v6' ] [ 'get' ] [ 'parameters' ] [ 'query' ] = {
@@ -991,7 +991,7 @@ export const getServerSideProps: GetServerSideProps<{
991
991
const tokensPromise = fetcher (
992
992
`${ reservoirBaseUrl } /tokens/v6` ,
993
993
tokensQuery ,
994
- headers
994
+ headers ,
995
995
)
996
996
997
997
const promises = await Promise . allSettled ( [
@@ -1009,12 +1009,12 @@ export const getServerSideProps: GetServerSideProps<{
1009
1009
1010
1010
const hasAttributes =
1011
1011
tokens ?. tokens ?. some (
1012
- ( token ) => ( token ?. token ?. attributes ?. length || 0 ) > 0
1012
+ ( token ) => ( token ?. token ?. attributes ?. length || 0 ) > 0 ,
1013
1013
) || false
1014
1014
1015
1015
res . setHeader (
1016
1016
'Cache-Control' ,
1017
- 'public, s-maxage=30, stale-while-revalidate=60'
1017
+ 'public, s-maxage=30, stale-while-revalidate=60' ,
1018
1018
)
1019
1019
1020
1020
return {
0 commit comments