PluginProbe
HubSpot All-In-One Marketing – Forms, Popups, Live Chat / 11.3.65
HubSpot All-In-One Marketing – Forms, Popups, Live Chat v11.3.65
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 / shared / Meeting / MeetingWarning.tsx

MeetingWarning.tsx in HubSpot All-In-One Marketing – Forms, Popups, Live Chat 11.3.65, at scripts/shared/Meeting/MeetingWarning.tsx

43 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import React from 'react';
2 import UIAlert from '../UIComponents/UIAlert';
3 import UIButton from '../UIComponents/UIButton';
4 import { CURRENT_USER_CALENDAR_MISSING } from './constants';
5 import { __ } from '@wordpress/i18n';
6
7 interface IMeetingWarningProps {
8 status: string;
9 onConnectCalendar: React.MouseEventHandler<HTMLButtonElement>;
10 }
11
12 export default function MeetingWarning({
13 status,
14 onConnectCalendar,
15 }: IMeetingWarningProps) {
16 const isMeetingOwner = status === CURRENT_USER_CALENDAR_MISSING;
17 const titleText = isMeetingOwner
18 ? __('Your calendar is not connected', 'leadin')
19 : __('Calendar is not connected', 'leadin');
20 const titleMessage = isMeetingOwner
21 ? __(
22 'Please connect your calendar to activate your scheduling pages',
23 'leadin'
24 )
25 : __(
26 'Make sure that everybody in this meeting has connected their calendar from the Meetings page in HubSpot',
27 'leadin'
28 );
29 return (
30 <UIAlert titleText={titleText} titleMessage={titleMessage}>
31 {isMeetingOwner && (
32 <UIButton
33 use="tertiary"
34 id="meetings-connect-calendar"
35 onClick={onConnectCalendar}
36 >
37 {__('Connect calendar', 'leadin')}
38 </UIButton>
39 )}
40 </UIAlert>
41 );
42 }
43