PluginProbe
HubSpot All-In-One Marketing – Forms, Popups, Live Chat / 11.3.75
HubSpot All-In-One Marketing – Forms, Popups, Live Chat v11.3.75
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
← All changes | scripts/elementor/FormWidget/ElementorFormSelect.tsx +7 -29 11.1.2111.3.75 View file →
@@ -1,15 +1,10 @@
1 -import React, { useState, useEffect, Fragment } from 'react';
2 -import { portalId, refreshToken } from '../../constants/leadinConfig';
1 +import { portalId } from '../../constants/leadinConfig';
2 +import { __ } from '@wordpress/i18n';
3 3 import ElementorBanner from '../Common/ElementorBanner';
4 4 import UISpinner from '../../shared/UIComponents/UISpinner';
5 -import { __ } from '@wordpress/i18n';
6 -import {
7 - BackgroudAppContext,
8 - useBackgroundAppContext,
9 -} from '../../iframe/useBackgroundApp';
10 5 import useForms from './hooks/useForms';
11 -import { getOrCreateBackgroundApp } from '../../utils/backgroundAppUtils';
6 +import EmbedderContainer from '../../shared/Common/EmbedderContainer';
12 7
13 8 interface IElementorFormSelectProps {
14 9 formId: string;
15 10 setAttributes: Function;
@@ -40,8 +35,9 @@
40 35 setAttributes({
41 36 portalId,
42 37 formId: selectedForm.value,
43 38 formName: selectedForm.label,
39 + embedVersion: selectedForm.embedVersion,
44 40 });
45 41 }
46 42 }}
47 43 >
@@ -56,31 +52,13 @@
56 52 </select>
57 53 );
58 54 }
59 55
60 -function ElementorFormSelectWrapper(props: IElementorFormSelectProps) {
61 - const isBackgroundAppReady = useBackgroundAppContext();
62 -
63 - return (
64 - <Fragment>
65 - {!isBackgroundAppReady ? (
66 - <div>
67 - <UISpinner />
68 - </div>
69 - ) : (
70 - <ElementorFormSelect {...props} />
71 - )}
72 - </Fragment>
73 - );
74 -}
75 -
76 56 export default function ElementorFormSelectContainer(
77 57 props: IElementorFormSelectProps
78 58 ) {
79 59 return (
80 - <BackgroudAppContext.Provider
81 - value={refreshToken && getOrCreateBackgroundApp(refreshToken)}
82 - >
83 - <ElementorFormSelectWrapper {...props} />
84 - </BackgroudAppContext.Provider>
60 + <EmbedderContainer>
61 + <ElementorFormSelect {...props} />
62 + </EmbedderContainer>
85 63 );
86 64 }