diff --git a/CHANGELOG.md b/CHANGELOG.md index f0f4409eed..edddb4d80c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ All notable, unreleased changes to this project will be documented in this file. - Fix checkout address view - #909 by @konstantinoschristomanos - Support for static url - #721 by @marianoeramirez and @dominik-zeglen - Fix search crashing when displaying item with no category - #928 by @mmarkusik +- Fix Generate site map - #915 by @rboixaderg ## 2.10.4 diff --git a/src/@next/pages/CheckoutPage/CheckoutPage.tsx b/src/@next/pages/CheckoutPage/CheckoutPage.tsx index e7af786079..bbe6d919d0 100755 --- a/src/@next/pages/CheckoutPage/CheckoutPage.tsx +++ b/src/@next/pages/CheckoutPage/CheckoutPage.tsx @@ -414,7 +414,9 @@ const CheckoutPage: React.FC = ({}: IProps) => { * https://docs.adyen.com/checkout/drop-in-web?tab=http_get_1#step-6-present-payment-result */ if ( - adyenNotNegativeConfirmationStatusCodes.includes(querystring.resultCode) + adyenNotNegativeConfirmationStatusCodes.includes( + querystring.resultCode as string + ) ) { const { data, dataError } = await completeCheckout(); const errors = dataError?.error; @@ -439,7 +441,7 @@ const CheckoutPage: React.FC = ({}: IProps) => { setPaymentGatewayErrors([ { message: translateAdyenConfirmationError( - querystring.resultCode, + querystring.resultCode as string, intl ), }, diff --git a/src/core/utils.ts b/src/core/utils.ts index 7514903793..2408fb324d 100644 --- a/src/core/utils.ts +++ b/src/core/utils.ts @@ -1,7 +1,11 @@ import { History, LocationState } from "history"; import { Base64 } from "js-base64"; import { each } from "lodash"; -import { parse as parseQs, stringify as stringifyQs } from "query-string"; +import { + parse as parseQs, + stringify as stringifyQs, + ParsedQuery, +} from "query-string"; import { FetchResult } from "react-apollo"; import { OrderDirection, ProductOrderField } from "../../gqlTypes/globalTypes"; @@ -128,8 +132,8 @@ export const maybe = (exp: () => T, d?: T) => { export const parseQueryString = ( location: LocationState -): { [key: string]: string } => { - let query: Record = parseQs(window.location.search.substr(1)); +): ParsedQuery => { + let query: ParsedQuery = parseQs(window.location.search.substr(1)); each(query, (value, key) => { if (Array.isArray(value)) { diff --git a/webpack.d.ts b/webpack.d.ts index 8408a85601..49209a1cd3 100644 --- a/webpack.d.ts +++ b/webpack.d.ts @@ -8,7 +8,6 @@ declare module "*.svg" { declare module "draftjs-to-html"; declare module "react-media"; declare module "js-base64"; -declare module "query-string"; // This was copied from @saleor/sdk/global.d.ts to make TS compiler happy declare interface Window {