PluginProbe
HubSpot All-In-One Marketing – Forms, Popups, Live Chat / 11.1.21
HubSpot All-In-One Marketing – Forms, Popups, Live Chat v11.1.21
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 / MeetingWidget / ElementorMeetingWarning.tsx

ElementorMeetingWarning.tsx in HubSpot All-In-One Marketing – Forms, Popups, Live Chat 11.1.21, at scripts/elementor/MeetingWidget/ElementorMeetingWarning.tsx

54 lines 1.5 KB
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 { CURRENT_USER_CALENDAR_MISSING } from '../../shared/Meeting/constants';
3 import ElementorButton from '../Common/ElementorButton';
4 import ElementorBanner from '../Common/ElementorBanner';
5 import { styled } from '@linaria/react';
6 import { __ } from '@wordpress/i18n';
7
8 const Container = styled.div`
9 padding-bottom: 8px;
10 `;
11
12 interface IMeetingWarningPros {
13 onConnectCalendar: React.MouseEventHandler<HTMLButtonElement>;
14 status: string;
15 }
16
17 export default function MeetingWarning({
18 onConnectCalendar,
19 status,
20 }: IMeetingWarningPros) {
21 const isMeetingOwner = status === CURRENT_USER_CALENDAR_MISSING;
22 const titleText = isMeetingOwner
23 ? __('Your calendar is not connected', 'leadin')
24 : __('Calendar is not connected', 'leadin');
25 const titleMessage = isMeetingOwner
26 ? __(
27 'Please connect your calendar to activate your scheduling pages',
28 'leadin'
29 )
30 : __(
31 'Make sure that everybody in this meeting has connected their calendar from the Meetings page in HubSpot',
32 'leadin'
33 );
34 return (
35 <Fragment>
36 <Container>
37 <ElementorBanner type="warning">
38 <b>{titleText}</b>
39 <br />
40 {titleMessage}
41 </ElementorBanner>
42 </Container>
43 {isMeetingOwner && (
44 <ElementorButton
45 id="meetings-connect-calendar"
46 onClick={onConnectCalendar}
47 >
48 {__('Connect calendar', 'leadin')}
49 </ElementorButton>
50 )}
51 </Fragment>
52 );
53 }
54