Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Move types

dominik-zeglen5f7f37c9d1f2
diff --git a/saleor/static/dashboard-next/components/AddressEdit/AddressEdit.tsx b/saleor/static/dashboard-next/components/AddressEdit/AddressEdit.tsx
index fa7bc8f887..6ce69af36b 100644
--- a/saleor/static/dashboard-next/components/AddressEdit/AddressEdit.tsx
+++ b/saleor/static/dashboard-next/components/AddressEdit/AddressEdit.tsx
@@ -2,7 +2,7 @@ import { withStyles } from "@material-ui/core/styles";
import TextField from "@material-ui/core/TextField";
import * as React from "react";
-import { AddressTypeInput } from "../../customers/";
+import { AddressTypeInput } from "../../customers/types";
import i18n from "../../i18n";
import FormSpacer from "../FormSpacer";
import SingleSelectField from "../SingleSelectField";
diff --git a/saleor/static/dashboard-next/components/AddressFormatter/AddressFormatter.tsx b/saleor/static/dashboard-next/components/AddressFormatter/AddressFormatter.tsx
index 0610613ac8..32a934e199 100644
--- a/saleor/static/dashboard-next/components/AddressFormatter/AddressFormatter.tsx
+++ b/saleor/static/dashboard-next/components/AddressFormatter/AddressFormatter.tsx
@@ -1,7 +1,7 @@
import Typography from "@material-ui/core/Typography";
import * as React from "react";
-import { AddressType } from "../../customers/";
+import { AddressType } from "../../customers/types";
import Skeleton from "../Skeleton";
interface AddressFormatterProps {
diff --git a/saleor/static/dashboard-next/customers/index.ts b/saleor/static/dashboard-next/customers/index.ts
index fa3a76f4ed..e69de29bb2 100644
--- a/saleor/static/dashboard-next/customers/index.ts
+++ b/saleor/static/dashboard-next/customers/index.ts
@@ -1,30 +0,0 @@
-export interface AddressTypeInput {
- city: string;
- cityArea?: string;
- companyName?: string;
- country: string;
- countryArea?: string;
- firstName: string;
- lastName: string;
- phone: string;
- postalCode: string;
- streetAddress1: string;
- streetAddress2?: string;
-}
-export interface AddressType {
- id: string;
- city: string;
- cityArea?: string;
- companyName?: string;
- country: {
- code: string;
- country: string;
- };
- countryArea?: string;
- firstName: string;
- lastName: string;
- phone: string;
- postalCode: string;
- streetAddress1: string;
- streetAddress2?: string;
-}
diff --git a/saleor/static/dashboard-next/customers/types.ts b/saleor/static/dashboard-next/customers/types.ts
new file mode 100644
index 0000000000..fa3a76f4ed
--- /dev/null
+++ b/saleor/static/dashboard-next/customers/types.ts
@@ -0,0 +1,30 @@
+export interface AddressTypeInput {
+ city: string;
+ cityArea?: string;
+ companyName?: string;
+ country: string;
+ countryArea?: string;
+ firstName: string;
+ lastName: string;
+ phone: string;
+ postalCode: string;
+ streetAddress1: string;
+ streetAddress2?: string;
+}
+export interface AddressType {
+ id: string;
+ city: string;
+ cityArea?: string;
+ companyName?: string;
+ country: {
+ code: string;
+ country: string;
+ };
+ countryArea?: string;
+ firstName: string;
+ lastName: string;
+ phone: string;
+ postalCode: string;
+ streetAddress1: string;
+ streetAddress2?: string;
+}
diff --git a/saleor/static/dashboard-next/orders/components/OrderAddressEditDialog/OrderAddressEditDialog.tsx b/saleor/static/dashboard-next/orders/components/OrderAddressEditDialog/OrderAddressEditDialog.tsx
index 620f4f5a34..6b557a0385 100644
--- a/saleor/static/dashboard-next/orders/components/OrderAddressEditDialog/OrderAddressEditDialog.tsx
+++ b/saleor/static/dashboard-next/orders/components/OrderAddressEditDialog/OrderAddressEditDialog.tsx
@@ -6,7 +6,7 @@ import DialogTitle from "@material-ui/core/DialogTitle";
import * as React from "react";
import AddressEdit from "../../../components/AddressEdit/AddressEdit";
-import { AddressTypeInput } from "../../../customers/";
+import { AddressTypeInput } from "../../../customers/types";
import i18n from "../../../i18n";
interface OrderAddressEditDialogProps {
diff --git a/saleor/static/dashboard-next/orders/components/OrderDetailsPage/OrderDetailsPage.tsx b/saleor/static/dashboard-next/orders/components/OrderDetailsPage/OrderDetailsPage.tsx
index 8f466912ab..d4601ee062 100644
--- a/saleor/static/dashboard-next/orders/components/OrderDetailsPage/OrderDetailsPage.tsx
+++ b/saleor/static/dashboard-next/orders/components/OrderDetailsPage/OrderDetailsPage.tsx
@@ -14,7 +14,7 @@ import Form from "../../../components/Form";
import PageHeader from "../../../components/PageHeader";
import Skeleton from "../../../components/Skeleton";
import Toggle from "../../../components/Toggle";
-import { AddressTypeInput } from "../../../customers";
+import { AddressTypeInput } from "../../../customers/types";
import i18n from "../../../i18n";
import { maybe, renderCollection } from "../../../misc";
import { OrderStatus } from "../../../types/globalTypes";
diff --git a/saleor/static/dashboard-next/orders/components/OrderDraftPage/OrderDraftPage.tsx b/saleor/static/dashboard-next/orders/components/OrderDraftPage/OrderDraftPage.tsx
index fdc49bed10..5422f98e28 100644
--- a/saleor/static/dashboard-next/orders/components/OrderDraftPage/OrderDraftPage.tsx
+++ b/saleor/static/dashboard-next/orders/components/OrderDraftPage/OrderDraftPage.tsx
@@ -13,7 +13,7 @@ import Form from "../../../components/Form";
import PageHeader from "../../../components/PageHeader";
import SaveButtonBar from "../../../components/SaveButtonBar";
import Skeleton from "../../../components/Skeleton";
-import { AddressTypeInput } from "../../../customers";
+import { AddressTypeInput } from "../../../customers/types";
import i18n from "../../../i18n";
import { maybe } from "../../../misc";
import { DraftOrderInput } from "../../../types/globalTypes";