From 78132229aff43e2a597139f182eb8d416752c9c8 Mon Sep 17 00:00:00 2001 From: Krzysztof Bialoglowicz Date: Thu, 12 Sep 2019 12:43:35 +0200 Subject: [PATCH] Fix types --- .../CollectionCreatePage/CollectionCreatePage.tsx | 1 - .../CollectionDetailsPage/CollectionDetailsPage.tsx | 1 - src/components/VisibilityCard/VisibilityCard.tsx | 10 +++------- src/discounts/components/SaleInfo/SaleInfo.tsx | 6 ------ .../components/PageDetailsPage/PageDetailsPage.tsx | 1 - .../components/ProductCreatePage/ProductCreatePage.tsx | 1 - .../components/ProductUpdatePage/ProductUpdatePage.tsx | 1 - 7 files changed, 3 insertions(+), 18 deletions(-) diff --git a/src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx b/src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx index 47ff7d60c..b9677c595 100644 --- a/src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx +++ b/src/collections/components/CollectionCreatePage/CollectionCreatePage.tsx @@ -150,7 +150,6 @@ const CollectionCreatePage: React.StatelessComponent< errors={formErrors} disabled={disabled} onChange={change} - translate="collection" /> diff --git a/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx b/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx index 3a5fb782d..bd56fe160 100644 --- a/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx +++ b/src/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx @@ -125,7 +125,6 @@ const CollectionDetailsPage: React.StatelessComponent< errors={formErrors} disabled={disabled} onChange={change} - translate="collection" > { errors: { [key: string]: string }; disabled?: boolean; onChange(event: any); - translate: string; } export const VisibilityCard = withStyles(styles, { @@ -55,8 +54,7 @@ export const VisibilityCard = withStyles(styles, { data: { isPublished, publicationDate }, errors, disabled, - onChange, - translate + onChange }: VisibilityCardProps) => { const intl = useIntl(); const [isPublicationDate, setPublicationDate] = React.useState( @@ -77,8 +75,7 @@ export const VisibilityCard = withStyles(styles, { defaultMessage: "since {date}" }, { - date: localizeDate(publicationDate), - description: translate + date: localizeDate(publicationDate) } ) : null @@ -92,8 +89,7 @@ export const VisibilityCard = withStyles(styles, { defaultMessage: "will be visible from {date}" }, { - date: localizeDate(publicationDate), - description: translate + date: localizeDate(publicationDate) } ) : null diff --git a/src/discounts/components/SaleInfo/SaleInfo.tsx b/src/discounts/components/SaleInfo/SaleInfo.tsx index ed1f7d25a..5195e8ec3 100644 --- a/src/discounts/components/SaleInfo/SaleInfo.tsx +++ b/src/discounts/components/SaleInfo/SaleInfo.tsx @@ -1,11 +1,5 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; -import { - createStyles, - Theme, - WithStyles, - withStyles -} from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; import React from "react"; import { useIntl } from "react-intl"; diff --git a/src/pages/components/PageDetailsPage/PageDetailsPage.tsx b/src/pages/components/PageDetailsPage/PageDetailsPage.tsx index 9e9d9df73..e3f0695bc 100644 --- a/src/pages/components/PageDetailsPage/PageDetailsPage.tsx +++ b/src/pages/components/PageDetailsPage/PageDetailsPage.tsx @@ -124,7 +124,6 @@ const PageDetailsPage: React.StatelessComponent = ({ disabled={disabled} errors={formErrors} onChange={change} - translate="product" /> diff --git a/src/products/components/ProductCreatePage/ProductCreatePage.tsx b/src/products/components/ProductCreatePage/ProductCreatePage.tsx index 79cee0883..08788dcfd 100644 --- a/src/products/components/ProductCreatePage/ProductCreatePage.tsx +++ b/src/products/components/ProductCreatePage/ProductCreatePage.tsx @@ -281,7 +281,6 @@ export const ProductCreatePage: React.StatelessComponent< errors={errors} disabled={disabled} onChange={change} - translate="page" /> diff --git a/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx b/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx index bf0729e41..acd0f4c70 100644 --- a/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx +++ b/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx @@ -291,7 +291,6 @@ export const ProductUpdatePage: React.FC = ({ errors={errors} disabled={disabled} onChange={change} - translate="product" />