@@ -64,8 +64,10 @@ export default function ThirdPartyCollectionDetailPage({
64
64
totalItems,
65
65
isLoading,
66
66
isThirdPartyV2Enabled,
67
- onOpenModal ,
67
+ isLinkedWearablesPaymentsEnabled ,
68
68
onFetchAvailableSlots,
69
+ onNewItem,
70
+ onEditName,
69
71
isLoadingAvailableSlots
70
72
} : Props ) {
71
73
const [ selectedItems , setSelectedItems ] = useState < Record < string , boolean > > ( { } )
@@ -100,14 +102,16 @@ export default function ThirdPartyCollectionDetailPage({
100
102
} , [ page , shouldFetchAllPages , items , thirdParty , currentPage ] )
101
103
102
104
const handleNewItems = useCallback ( ( ) => {
103
- onOpenModal ( 'CreateItemsModal' , { collectionId : collection ! . id } )
104
- } , [ collection , onOpenModal ] )
105
+ if ( collection ?. id ) {
106
+ onNewItem ( collection . id )
107
+ }
108
+ } , [ collection ?. id , onNewItem ] )
105
109
106
110
const handleEditName = useCallback ( ( ) => {
107
111
if ( collection ) {
108
- onOpenModal ( 'EditCollectionNameModal' , { collection } )
112
+ onEditName ( collection )
109
113
}
110
- } , [ collection , onOpenModal ] )
114
+ } , [ collection , onEditName ] )
111
115
112
116
const handleGoBack = useCallback ( ( ) => {
113
117
if ( isComingFromTheCollectionsPage ) {
@@ -255,16 +259,21 @@ export default function ThirdPartyCollectionDetailPage({
255
259
</ CopyToClipboard >
256
260
</ Info >
257
261
) }
258
- < Info title = { t ( 'third_party_collection_detail_page.slots_short' ) } info = { t ( 'third_party_collection_detail_page.slots_long' ) } >
259
- < div className = { styles . slotsIcon } />
260
- { isLoadingAvailableSlots ? (
261
- < Loader active inline size = "tiny" />
262
- ) : (
263
- < span >
264
- { thirdParty . availableSlots ?? 0 } / { thirdParty . maxItems }
265
- </ span >
266
- ) }
267
- </ Info >
262
+ { ! isLinkedWearablesPaymentsEnabled && (
263
+ < Info
264
+ title = { t ( 'third_party_collection_detail_page.slots_short' ) }
265
+ info = { t ( 'third_party_collection_detail_page.slots_long' ) }
266
+ >
267
+ < div className = { styles . slotsIcon } />
268
+ { isLoadingAvailableSlots ? (
269
+ < Loader active inline size = "tiny" />
270
+ ) : (
271
+ < span >
272
+ { thirdParty . availableSlots ?? 0 } / { thirdParty . maxItems }
273
+ </ span >
274
+ ) }
275
+ </ Info >
276
+ ) }
268
277
< Button inverted onClick = { handleNewItems } >
269
278
< Icon name = "plus" />
270
279
{ t ( 'third_party_collection_detail_page.new_items' ) }
@@ -393,6 +402,8 @@ export default function ThirdPartyCollectionDetailPage({
393
402
collection ,
394
403
selectedItems ,
395
404
isLoadingAvailableSlots ,
405
+ isLinkedWearablesPaymentsEnabled ,
406
+ isThirdPartyV2Enabled ,
396
407
totalItems ,
397
408
page ,
398
409
handleSelectItemChange ,
0 commit comments