Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Use revenue

dominik-zeglen902b09613254
diff --git a/saleor/static/dashboard-next/home/components/HomeProductListCard/HomeProductListCard.tsx b/saleor/static/dashboard-next/home/components/HomeProductListCard/HomeProductListCard.tsx
index 2e46cd8839..2ecbfdc071 100644
--- a/saleor/static/dashboard-next/home/components/HomeProductListCard/HomeProductListCard.tsx
+++ b/saleor/static/dashboard-next/home/components/HomeProductListCard/HomeProductListCard.tsx
@@ -99,8 +99,8 @@ export const HomeProductList = decorate<HomeProductListProps>(
{maybe(
() => (
<Money
- amount={variant.product.price.amount}
- currency={variant.product.price.currency}
+ amount={variant.revenue.gross.amount}
+ currency={variant.revenue.gross.currency}
/>
),
<Skeleton />
diff --git a/saleor/static/dashboard-next/home/queries.ts b/saleor/static/dashboard-next/home/queries.ts
index a6b099a065..66d97d5c4c 100644
--- a/saleor/static/dashboard-next/home/queries.ts
+++ b/saleor/static/dashboard-next/home/queries.ts
@@ -23,7 +23,7 @@ const home = gql`
productsOutOfStock: products(stockAvailability: OUT_OF_STOCK) {
totalCount
}
- productTopToday: reportProductSales(period: TODAY) {
+ productTopToday: reportProductSales(period: TODAY, first: 5) {
edges {
node {
id
@@ -44,10 +44,6 @@ const home = gql`
id
name
thumbnailUrl
- price {
- amount
- currency
- }
}
quantityOrdered
}
diff --git a/saleor/static/dashboard-next/home/types/Home.ts b/saleor/static/dashboard-next/home/types/Home.ts
index 88fafc7da1..a2921b5da3 100644
--- a/saleor/static/dashboard-next/home/types/Home.ts
+++ b/saleor/static/dashboard-next/home/types/Home.ts
@@ -61,18 +61,11 @@ export interface Home_productTopToday_edges_node_attributes {
value: Home_productTopToday_edges_node_attributes_value | null;
}
-export interface Home_productTopToday_edges_node_product_price {
- __typename: "Money";
- amount: number;
- currency: string;
-}
-
export interface Home_productTopToday_edges_node_product {
__typename: "Product";
id: string;
name: string;
thumbnailUrl: string | null;
- price: Home_productTopToday_edges_node_product_price | null;
}
export interface Home_productTopToday_edges_node {