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 { ParagraphEdit } from '../paragraph_edit.jsx';
import { StylesSettings } from './styles_settings';
import {
FormSettingsType,
InputBlockStyles,
} from '../../store/form_data_types';
import { InputBlockStyles } from '../../store/form_data_types';
type Props = {
attributes: {
@@ -22,7 +19,7 @@ type Props = {
};
function SubmitEdit({ attributes, setAttributes }: Props): JSX.Element {
const settings: FormSettingsType = useSelect(
const settings = useSelect(
(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))}`;
// 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}`;
}
return (

View File

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