Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

[Fix] Generate site map #915

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Refactor variant picker components and open sidebar after adding product to cart - #809 by @krzysztofwolski
- Fix checkout address view - #909 by @konstantinoschristomanos
- Support for static url - #721 by @marianoeramirez and @dominik-zeglen
- Fix Generate site map - #915 by @rboixaderg

## 2.10.4

Expand Down
6 changes: 4 additions & 2 deletions src/@next/pages/CheckoutPage/CheckoutPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,9 @@ const CheckoutPage: React.FC<IProps> = ({}: 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;
Expand All @@ -439,7 +441,7 @@ const CheckoutPage: React.FC<IProps> = ({}: IProps) => {
setPaymentGatewayErrors([
{
message: translateAdyenConfirmationError(
querystring.resultCode,
querystring.resultCode as string,
intl
),
},
Expand Down
10 changes: 7 additions & 3 deletions src/core/utils.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -128,8 +132,8 @@ export const maybe = <T>(exp: () => T, d?: T) => {

export const parseQueryString = (
location: LocationState
): { [key: string]: string } => {
let query: Record<string, string> = parseQs(window.location.search.substr(1));
): ParsedQuery<string> => {
let query: ParsedQuery<string> = parseQs(window.location.search.substr(1));

each(query, (value, key) => {
if (Array.isArray(value)) {
Expand Down
1 change: 0 additions & 1 deletion webpack.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down