mirror of
https://github.com/vercel/commerce.git
synced 2025-07-04 12:11: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'] =
|
const normalizedCategories: GetSiteInfoOperation['data']['categories'] =
|
||||||
spreeCategoriesSuccessResponse.data.sort(taxonsSort).map((spreeTaxon) => {
|
spreeCategoriesSuccessResponse.data
|
||||||
|
.sort(taxonsSort)
|
||||||
|
.map((spreeTaxon: TaxonAttr) => {
|
||||||
return {
|
return {
|
||||||
id: spreeTaxon.id,
|
id: spreeTaxon.id,
|
||||||
name: spreeTaxon.attributes.name,
|
name: spreeTaxon.attributes.name,
|
||||||
@ -121,7 +123,9 @@ export default function getSiteInfoOperation({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const normalizedBrands: GetSiteInfoOperation['data']['brands'] =
|
const normalizedBrands: GetSiteInfoOperation['data']['brands'] =
|
||||||
spreeBrandsSuccessResponse.data.sort(taxonsSort).map((spreeTaxon) => {
|
spreeBrandsSuccessResponse.data
|
||||||
|
.sort(taxonsSort)
|
||||||
|
.map((spreeTaxon: TaxonAttr) => {
|
||||||
return {
|
return {
|
||||||
node: {
|
node: {
|
||||||
entityId: spreeTaxon.id,
|
entityId: spreeTaxon.id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user