# leadin/11.1.21/scripts/elementor/MeetingWidget/MeetingWidgetController.tsx

HubSpot All-In-One Marketing – Forms, Popups, Live Chat, version 11.1.21. 35 lines.

- Page: https://pluginprobe.com/plugins/leadin/11.1.21/code/scripts/elementor/MeetingWidget/MeetingWidgetController.tsx
- Raw: https://pluginprobe.com/plugins/leadin/11.1.21/raw/scripts/elementor/MeetingWidget/MeetingWidgetController.tsx
- Modified: 2024-06-05T09:30:44+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/leadin/11.1.21/code/scripts/elementor/MeetingWidget/MeetingWidgetController.tsx#L10-L20`.

```tsx
import React, { Fragment } from 'react';
import { connectionStatus } from '../../constants/leadinConfig';
import ErrorHandler from '../../shared/Common/ErrorHandler';
import MeetingsEdit from '../../shared/Meeting/MeetingEdit';
import { IMeetingAttributes } from './registerMeetingWidget';

const ConnectionStatus = {
  Connected: 'Connected',
  NotConnected: 'NotConnected',
};

export default function MeetingWidgetController(
  attributes: IMeetingAttributes,
  setValue: Function
) {
  return () => {
    const render = () => {
      if (connectionStatus === ConnectionStatus.Connected) {
        return (
          <MeetingsEdit
            attributes={attributes}
            isSelected={true}
            setAttributes={setValue}
            preview={false}
            origin="elementor"
          />
        );
      } else {
        return <ErrorHandler status={401} />;
      }
    };
    return <Fragment>{render()}</Fragment>;
  };
}

```
