mirror of
https://github.com/vercel/commerce.git
synced 2025-07-03 19:51:22 +00:00
Add types to Spree taxons mapping
This commit is contained in:
parent
3d2ee58c4d
commit
eba8c28cc5
@ -111,7 +111,9 @@ export default function getSiteInfoOperation({
|
||||
})
|
||||
|
||||
const normalizedCategories: GetSiteInfoOperation['data']['categories'] =
|
||||
spreeCategoriesSuccessResponse.data.sort(taxonsSort).map((spreeTaxon) => {
|
||||
spreeCategoriesSuccessResponse.data
|
||||
.sort(taxonsSort)
|
||||
.map((spreeTaxon: TaxonAttr) => {
|
||||
return {
|
||||
id: spreeTaxon.id,
|
||||
name: spreeTaxon.attributes.name,
|
||||
@ -121,7 +123,9 @@ export default function getSiteInfoOperation({
|
||||
})
|
||||
|
||||
const normalizedBrands: GetSiteInfoOperation['data']['brands'] =
|
||||
spreeBrandsSuccessResponse.data.sort(taxonsSort).map((spreeTaxon) => {
|
||||
spreeBrandsSuccessResponse.data
|
||||
.sort(taxonsSort)
|
||||
.map((spreeTaxon: TaxonAttr) => {
|
||||
return {
|
||||
node: {
|
||||
entityId: spreeTaxon.id,
|
||||
|
Loading…
x
Reference in New Issue
Block a user