Remove no longer necessary types

[MAILPOET-4323]
This commit is contained in:
Jan Jakes
2022-05-10 14:05:37 +02:00
committed by Veljko V
parent abae76f8df
commit da624cff1f
3 changed files with 4 additions and 8 deletions

View File

@@ -7,10 +7,7 @@ import { useSelect } from '@wordpress/data';
import { MailPoet } from 'mailpoet'; import { MailPoet } from 'mailpoet';
import { ParagraphEdit } from '../paragraph_edit.jsx'; import { ParagraphEdit } from '../paragraph_edit.jsx';
import { StylesSettings } from './styles_settings'; import { StylesSettings } from './styles_settings';
import { import { InputBlockStyles } from '../../store/form_data_types';
FormSettingsType,
InputBlockStyles,
} from '../../store/form_data_types';
type Props = { type Props = {
attributes: { attributes: {
@@ -22,7 +19,7 @@ type Props = {
}; };
function SubmitEdit({ attributes, setAttributes }: Props): JSX.Element { function SubmitEdit({ attributes, setAttributes }: Props): JSX.Element {
const settings: FormSettingsType = useSelect( const settings = useSelect(
(select) => select('mailpoet-form-editor').getFormSettings(), (select) => select('mailpoet-form-editor').getFormSettings(),
[], [],
); );

View File

@@ -102,7 +102,7 @@ export function FormPreview(): JSX.Element {
}; };
let iframeSrc = `${previewPageUrl}&data=${btoa(JSON.stringify(urlData))}`; let iframeSrc = `${previewPageUrl}&data=${btoa(JSON.stringify(urlData))}`;
// Add anchor to scroll to certain types of form // Add anchor to scroll to certain types of form
if (['below_post'].includes(previewSettings.formType as string)) { if (['below_post'].includes(previewSettings.formType)) {
iframeSrc += `#mailpoet_form_preview_${formId}`; iframeSrc += `#mailpoet_form_preview_${formId}`;
} }
return ( return (

View File

@@ -1,13 +1,12 @@
import { MailPoet } from 'mailpoet'; import { MailPoet } from 'mailpoet';
import { select } from '@wordpress/data'; import { select } from '@wordpress/data';
import { STORE_NAME } from './store_name'; import { STORE_NAME } from './store_name';
import { Settings } from './types';
export { callApi as CALL_API } from 'common/controls/call_api'; export { callApi as CALL_API } from 'common/controls/call_api';
// eslint-disable-next-line @typescript-eslint/naming-convention // eslint-disable-next-line @typescript-eslint/naming-convention
export function TRACK_SETTINGS_SAVED() { export function TRACK_SETTINGS_SAVED() {
const settings: Settings = select(STORE_NAME).getSettings(); const settings = select(STORE_NAME).getSettings();
const data = { const data = {
'Sending method type': settings.mta_group || null, 'Sending method type': settings.mta_group || null,
'Sending frequency (emails)': 'Sending frequency (emails)':