Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Refactor types just a little bit more
dominik-zeglen0f59abcd6b1d
diff --git a/saleor/static/dashboard-next/index.tsx b/saleor/static/dashboard-next/index.tsxindex a8a2457d08..a3bc741f2a 100644--- a/saleor/static/dashboard-next/index.tsx+++ b/saleor/static/dashboard-next/index.tsx@@ -98,6 +98,9 @@ export interface PartialMutationProviderRenderProps<mutate: MutationFn<TData, TVariables>;}+export interface MutationProviderProps {+ onError?: (error: ApolloError) => void;+}export type MutationProviderRenderProps<T> = (props: T & { errors: UserError[] }) => React.ReactElement<any>;diff --git a/saleor/static/dashboard-next/products/containers/ProductUpdateOperations.tsx b/saleor/static/dashboard-next/products/containers/ProductUpdateOperations.tsxindex d64572b7fb..5ddf36bb59 100644--- a/saleor/static/dashboard-next/products/containers/ProductUpdateOperations.tsx+++ b/saleor/static/dashboard-next/products/containers/ProductUpdateOperations.tsx@@ -2,6 +2,7 @@ import * as React from "react";import { ApolloError } from "apollo-client";import {+ MutationProviderProps,MutationProviderRenderProps,PartialMutationProviderOutput,PartialMutationProviderProps,@@ -101,8 +102,7 @@ const ProductImageCreateProvider: React.StatelessComponent<</TypedProductImageCreateMutation>);-interface ProductUpdateOperationsProps- extends PartialMutationProviderProps<ProductImageCreateMutation> {+interface ProductUpdateOperationsProps extends MutationProviderProps {product?: ProductDetailsQuery["product"];children: MutationProviderRenderProps<{createProductImage: PartialMutationProviderOutput<@@ -120,7 +120,6 @@ interface ProductUpdateOperationsProps>;}>;onDelete?: (data: ProductDeleteMutation) => void;- onError?: (error: ApolloError) => void;onImageCreate?: (data: ProductImageCreateMutation) => void;onImageReorder?: (data: ProductImageReorderMutation) => void;onUpdate?: (data: ProductUpdateMutation) => void;