Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Remove notofications component from homepage
Lukasz Szewczyk6cd7a6281b79
diff --git a/saleor/static/dashboard-next/home/components/Dashbaord/Dashbaord.tsx b/saleor/static/dashboard-next/home/components/Dashbaord/Dashbaord.tsxindex b264f5d3aa..9dd0cc0ef3 100644--- a/saleor/static/dashboard-next/home/components/Dashbaord/Dashbaord.tsx+++ b/saleor/static/dashboard-next/home/components/Dashbaord/Dashbaord.tsx@@ -6,7 +6,6 @@ import Container from "../../../components/Container";import PageHeader from "../../../components/PageHeader";import i18n from "../../../i18n";import HomeActivityCard from "../HomeActivityCard";-import HomeNotificationTable from "../HomeNotificationTable";import HomeOrdersCard from "../HomeOrdersCard";import HomeProductListCard from "../HomeProductListCard";import HomeSalesCard from "../HomeSalesCard";@@ -31,12 +30,6 @@ export interface DashboardProps {};sales: MoneyType;};- notifications: {- orders: number;- payments: number;- problems: number;- productsOut: number;- };onRowClick: () => undefined;ownerName: string;topProducts: Array<{@@ -47,10 +40,6 @@ export interface DashboardProps {thumbnailUrl: string;variant: string;}>;- toOrders: () => void;- toPayments: () => void;- toProblems: () => void;- toProductsOut: () => void;}const decorate = withStyles(theme => ({@@ -74,19 +63,7 @@ const decorate = withStyles(theme => ({}}));const Dashboard = decorate<DashboardProps>(- ({- ownerName,- classes,- daily,- notifications,- toOrders,- toPayments,- toProblems,- toProductsOut,- topProducts,- onRowClick,- activities- }) => {+ ({ ownerName, classes, daily, topProducts, onRowClick, activities }) => {return (<Container width="md"><PageHeader@@ -105,15 +82,6 @@ const Dashboard = decorate<DashboardProps>(<HomeOrdersCard disabled={false} title={"Orders"} daily={daily} /></div>- <CardSpacer />- <HomeNotificationTable- disabled={false}- notifications={notifications}- toOrders={toOrders}- toPayments={toPayments}- toProblems={toProblems}- toProductsOut={toProductsOut}- /><CardSpacer /><HomeProductListCardonRowClick={onRowClick}diff --git a/saleor/static/dashboard-next/home/components/HomeNotificationTable/HomeNotificationTable.tsx b/saleor/static/dashboard-next/home/components/HomeNotificationTable/HomeNotificationTable.tsxindex 3bbff2556d..bc31ec3969 100644--- a/saleor/static/dashboard-next/home/components/HomeNotificationTable/HomeNotificationTable.tsx+++ b/saleor/static/dashboard-next/home/components/HomeNotificationTable/HomeNotificationTable.tsx@@ -10,6 +10,18 @@ import * as React from "react";import Skeleton from "../../../components/Skeleton";import i18n from "../../../i18n";+// component implementation+{+ /* <HomeNotificationTable+disabled={false}+notifications={notifications}+toOrders={toOrders}+toPayments={toPayments}+toProblems={toProblems}+toProductsOut={toProductsOut}+/> */+}+interface HomeNotificationTableProps {disabled: boolean;notifications: {diff --git a/saleor/static/dashboard-next/storybook/stories/home/dashboard.tsx b/saleor/static/dashboard-next/storybook/stories/home/dashboard.tsxindex 78587a2407..549adf9250 100644--- a/saleor/static/dashboard-next/storybook/stories/home/dashboard.tsx+++ b/saleor/static/dashboard-next/storybook/stories/home/dashboard.tsx@@ -10,13 +10,8 @@ const shop = shopFixture(placeholderImage);const dashboardProps: DashboardProps = {activities: shop.activities,daily: shop.daily,- notifications: shop.notifications,onRowClick: () => undefined,ownerName: shop.ownerName,- toOrders: () => undefined,- toPayments: () => undefined,- toProblems: () => undefined,- toProductsOut: () => undefined,topProducts: shop.topProducts};@@ -28,20 +23,9 @@ storiesOf("Views / Home / Dashboard", module){...dashboardProps}topProducts={undefined}daily={undefined}- notifications={undefined}activities={undefined}/>)).add("no data", () => (- <Dashbaord- {...dashboardProps}- topProducts={[]}- notifications={{- orders: 0,- payments: 0,- problems: 0,- productsOut: 0- }}- activities={[]}- />+ <Dashbaord {...dashboardProps} topProducts={[]} activities={[]} />));