diff --git a/src/siteSettings/components/SiteSettingsMailing/SiteSettingsMailing.tsx b/src/siteSettings/components/SiteSettingsMailing/SiteSettingsMailing.tsx deleted file mode 100644 index c5d873855..000000000 --- a/src/siteSettings/components/SiteSettingsMailing/SiteSettingsMailing.tsx +++ /dev/null @@ -1,141 +0,0 @@ -import Card from "@material-ui/core/Card"; -import CardContent from "@material-ui/core/CardContent"; -import TextField from "@material-ui/core/TextField"; -import Typography from "@material-ui/core/Typography"; -import CardTitle from "@saleor/components/CardTitle"; -import FormSpacer from "@saleor/components/FormSpacer"; -import Hr from "@saleor/components/Hr"; -import { ShopErrorFragment } from "@saleor/fragments/types/ShopErrorFragment"; -import { makeStyles } from "@saleor/theme"; -import { getFormErrors } from "@saleor/utils/errors"; -import getShopErrorMessage from "@saleor/utils/errors/shop"; -import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; - -export interface SiteSettingsMailingFormData { - defaultMailSenderName: string; - defaultMailSenderAddress: string; - customerSetPasswordUrl: string; -} -interface SiteSettingsMailingProps { - data: SiteSettingsMailingFormData; - errors: ShopErrorFragment[]; - disabled: boolean; - onChange: (event: React.ChangeEvent) => void; -} - -const useStyles = makeStyles( - theme => ({ - cardHelperText: { - position: "relative", - top: -theme.spacing(1) - }, - cardHelperTextCaption: { - marginBottom: theme.spacing(2) - } - }), - { - name: "SiteSettingsMailing" - } -); - -const SiteSettingsMailing: React.FC = props => { - const { data, disabled, errors, onChange } = props; - - const classes = useStyles(props); - const intl = useIntl(); - - const formErrors = getFormErrors( - [ - "defaultMailSenderAddress", - "defaultMailSenderName", - "customerSetPasswordUrl" - ], - errors - ); - - return ( - - - - - - - - - - - - - -
- - -
-
- ); -}; -SiteSettingsMailing.displayName = "SiteSettingsMailing"; -export default SiteSettingsMailing; diff --git a/src/siteSettings/components/SiteSettingsMailing/index.ts b/src/siteSettings/components/SiteSettingsMailing/index.ts deleted file mode 100644 index 424ec5bea..000000000 --- a/src/siteSettings/components/SiteSettingsMailing/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default } from "./SiteSettingsMailing"; -export * from "./SiteSettingsMailing"; diff --git a/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx b/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx index e6f96982c..82af939fc 100644 --- a/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx +++ b/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx @@ -22,9 +22,6 @@ import { FormattedMessage, useIntl } from "react-intl"; import { maybe } from "../../../misc"; import { SiteSettings_shop } from "../../types/SiteSettings"; import SiteSettingsDetails from "../SiteSettingsDetails/SiteSettingsDetails"; -import SiteSettingsMailing, { - SiteSettingsMailingFormData -} from "../SiteSettingsMailing"; export interface SiteSettingsPageAddressFormData { city: string; @@ -38,8 +35,7 @@ export interface SiteSettingsPageAddressFormData { } export interface SiteSettingsPageFormData - extends SiteSettingsPageAddressFormData, - SiteSettingsMailingFormData { + extends SiteSettingsPageAddressFormData { description: string; domain: string; name: string; @@ -114,9 +110,6 @@ const SiteSettingsPage: React.FC = props => { }; const initialForm: SiteSettingsPageFormData = { ...initialFormAddress, - customerSetPasswordUrl: maybe(() => shop.customerSetPasswordUrl, ""), - defaultMailSenderAddress: maybe(() => shop.defaultMailSenderAddress, ""), - defaultMailSenderName: maybe(() => shop.defaultMailSenderName, ""), description: maybe(() => shop.description, ""), domain: maybe(() => shop.domain.host, ""), name: maybe(() => shop.name, "") @@ -165,24 +158,6 @@ const SiteSettingsPage: React.FC = props => { onChange={change} />
-
- - - - - - -
- -
= () => { name: data.name }, shopSettingsInput: { - customerSetPasswordUrl: data.customerSetPasswordUrl, - defaultMailSenderAddress: data.defaultMailSenderAddress, - defaultMailSenderName: data.defaultMailSenderName, description: data.description } } diff --git a/src/storybook/__snapshots__/Stories.test.ts.snap b/src/storybook/__snapshots__/Stories.test.ts.snap index 76d46592b..34d9cd5a8 100644 --- a/src/storybook/__snapshots__/Stories.test.ts.snap +++ b/src/storybook/__snapshots__/Stories.test.ts.snap @@ -214086,180 +214086,6 @@ exports[`Storyshots Views / Site settings / Page default 1`] = `
-
-
- Mailing Configuration -
-
- This where you will find all of the settings determining your stores e-mails. You can determine main email address and some of the contents of your emails. -
-
-
-
- - Mailing Configuration - -
-
-
-
-
-
- Mailing Configuration -
-
- Configurate your email address from which all automatic emails will be sent to your customers. -
-
- -
- - -
-
-
-
- -
- - -
-

- This will be visible as "from" name -

-
-
-
-
-
- -
- - -
-

- This URL will be used as a main URL for password resets. It will be sent via email. -

-
-
-
-
-
-
- Mailing Configuration -
-
- This where you will find all of the settings determining your stores e-mails. You can determine main email address and some of the contents of your emails. -
-
-
-
- - Mailing Configuration - -
-
-
-
-
-
- Mailing Configuration -
-
- Configurate your email address from which all automatic emails will be sent to your customers. -
-
- -
- - -
-

- Invalid value -

-
-
-
- -
- - -
-

- Invalid value -

-
-
-
-
-
- -
- - -
-

- Invalid value -

-
-
-
-
-
-
- Mailing Configuration -
-
- This where you will find all of the settings determining your stores e-mails. You can determine main email address and some of the contents of your emails. -
-
-
-
- - Mailing Configuration - -
-
-
-
-
-
- Mailing Configuration -
-
- Configurate your email address from which all automatic emails will be sent to your customers. -
-
- -
- - -
-
-
-
- -
- - -
-

- This will be visible as "from" name -

-
-
-
-
-
- -
- - -
-

- This URL will be used as a main URL for password resets. It will be sent via email. -

-
-
-
-