PluginProbe
HubSpot All-In-One Marketing – Forms, Popups, Live Chat / 11.0.54
HubSpot All-In-One Marketing – Forms, Popups, Live Chat v11.0.54
11.3.75 11.3.73 11.3.71 11.3.70 11.3.69 11.3.64 11.3.65 11.3.62 11.3.61 11.3.56 11.3.58 11.0.31 11.0.52 11.0.54 11.0.56 11.0.58 11.0.7 11.1.10 11.1.11 11.1.13 11.1.14 11.1.15 11.1.2 11.1.20 11.1.21 All 73 releases
leadin / scripts / elementor / FormWidget / FormWidgetController.tsx

FormWidgetController.tsx in HubSpot All-In-One Marketing – Forms, Popups, Live Chat 11.0.54, at scripts/elementor/FormWidget/FormWidgetController.tsx

31 lines 900 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import React, { Fragment } from 'react';
2 import { connectionStatus } from '../../constants/leadinConfig';
3 import ErrorHandler from '../../shared/Common/ErrorHandler';
4 import FormEdit from '../../shared/Form/FormEdit';
5 import ConnectionStatus from '../../shared/enums/connectionStatus';
6 import { IFormAttributes } from './registerFormWidget';
7
8 export default function FormWidgetController(
9 attributes: IFormAttributes,
10 setValue: Function
11 ) {
12 return () => {
13 const render = () => {
14 if (connectionStatus === ConnectionStatus.Connected) {
15 return (
16 <FormEdit
17 attributes={attributes}
18 isSelected={true}
19 setAttributes={setValue}
20 preview={false}
21 origin="elementor"
22 />
23 );
24 } else {
25 return <ErrorHandler status={401} />;
26 }
27 };
28 return <Fragment>{render()}</Fragment>;
29 };
30 }
31