Skip to content

Commit

Permalink
feat: Fix 400 error
Browse files Browse the repository at this point in the history
  • Loading branch information
r3lays committed Jul 28, 2023
1 parent 450b5a6 commit fa3acf0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions hooks/useTopSellingCollections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@ export default function (
swrOptions
)

const ids = topSellingData?.collections?.map(
(collection) => collection.id as string
)
const ids = topSellingData?.collections?.map((collection) => {
if (collection.id?.includes(':')) {
return collection.id.split(':')[0] as string
}
return collection.id as string
})

const { data: collections, isValidating: isValidatingCollections } =
useCollections(
Expand Down

0 comments on commit fa3acf0

Please sign in to comment.