diff --git a/framework/saleor/utils/get-categories.ts b/framework/saleor/utils/get-categories.ts index 990c0a404..bd8fde997 100644 --- a/framework/saleor/utils/get-categories.ts +++ b/framework/saleor/utils/get-categories.ts @@ -10,14 +10,18 @@ const getCategories = async (config: SaleorConfig): Promise => { }, }) - return ( + const categories = data.collections?.edges?.map(({ node: { id, name, slug } }: CollectionCountableEdge) => ({ id, name, slug, path: `/${slug}`, })) ?? [] - ) + + // FIXME temp hack + const result = categories.sort((a: any, b: any) => a.name.localeCompare(b.name)) + + return result } export default getCategories