Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
iago1501 committed Oct 31, 2024
1 parent ea3e9e8 commit 0b0de8c
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions react/components/SKUSelector/components/SKUSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,9 @@ interface AvailableVariationParams {
}

export const orderItemsByAvailability = (
item1: SelectorProductItem,
item1: SelectorProductItem,
item2: SelectorProductItem
) => {

const isAvailableItem1 = isSkuAvailable(item1)
const isAvailableItem2 = isSkuAvailable(item2)

Expand All @@ -140,17 +139,15 @@ export const orderItemsByAvailability = (
const defaultSellerItem1 = getDefaultSeller(item1.sellers)
const defaultSellerItem2 = getDefaultSeller(item2.sellers)

const availabilityItem1 = defaultSellerItem1
const availabilityItem1 = defaultSellerItem1
? defaultSellerItem1.commertialOffer.AvailableQuantity : 0

Check failure on line 143 in react/components/SKUSelector/components/SKUSelector.tsx

View workflow job for this annotation

GitHub Actions / Lint

Insert `⏎···`

const availabilityItem2 = defaultSellerItem2
const availabilityItem2 = defaultSellerItem2
? defaultSellerItem2.commertialOffer.AvailableQuantity : 0

Check failure on line 146 in react/components/SKUSelector/components/SKUSelector.tsx

View workflow job for this annotation

GitHub Actions / Lint

Insert `⏎···`

return availabilityItem2 - availabilityItem1

}


const parseOptionNameToDisplayOption =
({
selectedVariations,
Expand Down Expand Up @@ -193,8 +190,8 @@ const parseOptionNameToDisplayOption =
// This is a valid combination option

const possibleItemsOrderedByAvailability =
possibleItems.length > 1
? possibleItems.sort(orderItemsByAvailability)
possibleItems.length > 1
? possibleItems.sort(orderItemsByAvailability)

Check failure on line 194 in react/components/SKUSelector/components/SKUSelector.tsx

View workflow job for this annotation

GitHub Actions / Lint

Insert `··`
: possibleItems

const [item] = possibleItemsOrderedByAvailability
Expand Down

0 comments on commit 0b0de8c

Please sign in to comment.