File size: 2,227 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import { Card } from '@automattic/components';
import { localize } from 'i18n-calypso';
import { Component } from 'react';
import { connect } from 'react-redux';
import ExternalLinkWithTracking from 'calypso/components/external-link-with-tracking';
import { recordTracksEvent } from 'calypso/state/analytics/actions';
import PrimaryHeader from './primary-header';

class NoAvailableTimes extends Component {
	componentDidMount() {
		this.props.recordTracksEvent( 'calypso_concierge_no_available_times' );
	}

	render() {
		const { translate, isUserBlocked } = this.props;
		return (
			<div>
				<PrimaryHeader />
				<Card>
					<h2 className="shared__no-available-times-heading">
						{ translate( 'Sorry, all upcoming sessions are full.' ) }
					</h2>
					{ isUserBlocked &&
						translate(
							'We add new sessions daily, so please check back soon for more options. In the meantime, consider attending one of our expert webinars on a wide variety of topics designed to help you build and grow your site. {{externalLink1}}View webinars{{/externalLink1}}.',
							{
								components: {
									externalLink1: (
										<ExternalLinkWithTracking
											href="/webinars"
											tracksEventName="calypso_concierge_book_view_webinars"
										/>
									),
								},
							}
						) }
					{ ! isUserBlocked &&
						translate(
							'We add new sessions daily, so please check back soon for more options. In the meantime, consider attending one of our expert webinars on a wide variety of topics designed to help you build and grow your site. {{externalLink1}}View webinars{{/externalLink1}} or {{externalLink2}}contact us in Live Chat{{/externalLink2}}.',
							{
								components: {
									externalLink1: (
										<ExternalLinkWithTracking
											href="/webinars"
											tracksEventName="calypso_concierge_book_view_webinars"
										/>
									),
									externalLink2: (
										<ExternalLinkWithTracking
											href="/help/contact"
											tracksEventName="calypso_concierge_book_contact_us"
										/>
									),
								},
							}
						) }
				</Card>
			</div>
		);
	}
}

export default connect( null, { recordTracksEvent } )( localize( NoAvailableTimes ) );