diff --git a/src/components/CheckoutActions/CheckoutActions.js b/src/components/CheckoutActions/CheckoutActions.js index 60e7d7ff7e..60b0aa4054 100644 --- a/src/components/CheckoutActions/CheckoutActions.js +++ b/src/components/CheckoutActions/CheckoutActions.js @@ -36,6 +36,8 @@ const MessageDiv = styled.div` const NoPaymentMethodsMessage = () => No payment methods available; +NoPaymentMethodsMessage.renderComplete = () => ""; + @withAddressValidation @track() @observer diff --git a/src/containers/tags/tag.gql b/src/containers/tags/tag.gql index b884293761..62d9657d1a 100644 --- a/src/containers/tags/tag.gql +++ b/src/containers/tags/tag.gql @@ -1,7 +1,7 @@ #import "./tagFragment.gql" -query tagQuery($slugOrId: String) { - tag(slugOrId: $slugOrId) { +query tagQuery($shopId: ID!, $slugOrId: String!) { + tag(shopId: $shopId, slugOrId: $slugOrId) { ...TagInfo } } diff --git a/src/containers/tags/withTag.js b/src/containers/tags/withTag.js index a1aa514482..13b1e7eebe 100644 --- a/src/containers/tags/withTag.js +++ b/src/containers/tags/withTag.js @@ -12,10 +12,11 @@ import tagQuery from "./tag.gql"; * @returns {React.Component} - Component with `tag` prop */ export default function withTag(Component) { - @inject("routingStore") + @inject("primaryShopId", "routingStore") @observer class WithTag extends React.Component { static propTypes = { + primaryShopId: PropTypes.string.isRequired, /** * slug used to obtain tag info */ @@ -27,14 +28,19 @@ export default function withTag(Component) { render() { const { + primaryShopId, router: { query: { slug: slugFromQueryParam } }, routingStore: { tagId } } = this.props; const slugOrId = slugFromQueryParam || tagId; + if (!primaryShopId || !slugOrId) { + return ; + } + return ( - + {({ error, data }) => { if (error) { console.error("WithTag query error:", error); // eslint-disable-line no-console