diff --git a/src/collections/components/CollectionList/CollectionList.tsx b/src/collections/components/CollectionList/CollectionList.tsx index 575cadcd2..f25a2986c 100644 --- a/src/collections/components/CollectionList/CollectionList.tsx +++ b/src/collections/components/CollectionList/CollectionList.tsx @@ -17,6 +17,7 @@ import React from "react"; import { FormattedMessage } from "react-intl"; import { CollectionList_collections_edges_node } from "../../types/CollectionList"; +import { messages } from "./messages"; const useStyles = makeStyles( theme => ({ @@ -191,7 +192,7 @@ const CollectionList: React.FC = props => { (collection?.channelListings !== undefined && channel ? ( ) : ( { +export const AvailabilityStatusLabel = ({ channel, messages }) => { const intl = useIntl(); const localizeDate = useDateLocalize(); @@ -18,8 +16,7 @@ export const AvailabilityStatusLabel = ({ channel, type = "" }) => { : messages.willBePublished : messages.unpublished, { - date: localizeDate(channel.publicationDate, "L"), - type + date: localizeDate(channel.publicationDate, "L") } )} status={ diff --git a/src/products/components/ProductList/ProductList.tsx b/src/products/components/ProductList/ProductList.tsx index 7f2068e91..9d8d2798b 100644 --- a/src/products/components/ProductList/ProductList.tsx +++ b/src/products/components/ProductList/ProductList.tsx @@ -36,6 +36,8 @@ import classNames from "classnames"; import React from "react"; import { FormattedMessage } from "react-intl"; +import { messages } from "./messages"; + const useStyles = makeStyles( theme => ({ [theme.breakpoints.up("lg")]: { @@ -377,7 +379,7 @@ export const ProductList: React.FC = props => { (product?.channelListings !== undefined && channel ? ( ) : (