@openeventkit/event-site 1.0.13 → 1.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/gatsby-browser.js +2 -2
- package/gatsby-config.js +39 -27
- package/gatsby-node.js +23 -18
- package/package.json +2 -2
- package/src/cms/cms.js +2 -2
- package/src/cms/config/collections/configurationsCollection/index.js +1 -1
- package/src/cms/config/collections/configurationsCollection/navbar/index.js +0 -1
- package/src/cms/config/collections/configurationsCollection/siteSettings/index.js +0 -1
- package/src/cms/config/collections/contentPagesCollection/index.js +65 -0
- package/src/cms/config/collections/contentPagesCollection/typeDefs.js +8 -0
- package/src/cms/config/collections/defaultPagesCollection/index.js +2 -2
- package/src/cms/config/collections/defaultPagesCollection/lobbyPage/index.js +67 -0
- package/src/cms/config/collections/defaultPagesCollection/lobbyPage/typeDefs.js +21 -0
- package/src/cms/config/collections/defaultPagesCollection/marketingPage/index.js +1 -1
- package/src/cms/config/collections/defaultPagesCollection/marketingPage/typeDefs.js +1 -1
- package/src/cms/config/collections/typeDefs.js +3 -1
- package/src/cms/config/fields.js +0 -4
- package/src/cms/config/index.js +4 -2
- package/src/cms/config/patterns.js +3 -4
- package/src/cms/preview-templates/{CustomPagePreview.js → ContentPagePreview.js} +5 -5
- package/src/components/DisqusComponent.js +3 -5
- package/src/components/FullSchedule.js +5 -4
- package/src/components/LiteScheduleComponent.js +34 -36
- package/src/components/LiveEventWidgetComponent.js +29 -24
- package/src/components/Navbar/index.js +1 -0
- package/src/components/{page-header/index.jsx → PageHeader/index.js} +9 -5
- package/src/components/RegistrationLiteComponent.js +66 -56
- package/src/components/UpcomingEventsComponent.js +46 -48
- package/src/content/lobby-page/index.json +1 -0
- package/src/pages/a/[...].js +15 -14
- package/src/pages/index.js +1 -1
- package/src/reducers/presentations-reducer.js +1 -1
- package/src/reducers/setting-reducer.js +3 -4
- package/src/styles/style.scss +1 -1
- package/src/templates/{custom-page.js → content-page.js} +10 -8
- package/src/templates/event-page.js +247 -247
- package/src/templates/lobby-page.js +178 -0
- package/src/templates/maintenance-page.js +5 -5
- package/src/templates/poster-detail-page.js +2 -5
- package/src/templates/posters-page.js +1 -1
- package/src/utils/filePath.js +13 -7
- package/src/utils/phasesUtils.js +1 -1
- package/src/utils/useMarketingSettings.js +10 -8
- package/static/admin/config.yml.template +1 -2
- package/src/content/disqus-settings.json +0 -1
- package/src/content/home-settings.json +0 -1
- package/src/content/marketing-settings.json +0 -1
- package/src/pages/custom-pages/about-event.md +0 -16
- package/src/pages/custom-pages/contact.md +0 -8
- package/src/pages/custom-pages/footer-content.md +0 -8
- package/src/pages/custom-pages/help.md +0 -8
- package/src/pages/custom-pages/past-events.md +0 -8
- package/src/pages/custom-pages/who-we-are.md +0 -8
- package/src/templates/home-page.js +0 -170
- /package/src/components/{page-header → PageHeader}/index.module.scss +0 -0
- /package/src/{content → defaults}/colors.json +0 -0
- /package/src/{content → defaults}/posters-filters.json +0 -0
package/src/styles/style.scss
CHANGED
|
@@ -6,7 +6,9 @@ import { Redirect } from "@gatsbyjs/reach-router";
|
|
|
6
6
|
import Layout from "../components/Layout";
|
|
7
7
|
import Content, { HTMLContent } from "../components/Content";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
import { USER_REQUIREMENTS } from "../cms/config/collections/contentPagesCollection"
|
|
10
|
+
|
|
11
|
+
export const ContentPageTemplate = ({
|
|
10
12
|
title,
|
|
11
13
|
content,
|
|
12
14
|
contentComponent
|
|
@@ -21,24 +23,24 @@ export const CustomPageTemplate = ({
|
|
|
21
23
|
)
|
|
22
24
|
}
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
ContentPageTemplate.propTypes = {
|
|
25
27
|
title: PropTypes.string,
|
|
26
28
|
content: PropTypes.string,
|
|
27
29
|
contentComponent: PropTypes.func,
|
|
28
30
|
}
|
|
29
31
|
|
|
30
|
-
const
|
|
32
|
+
const ContentPage = ({ data, isLoggedUser, hasTicket, isAuthorized }) => {
|
|
31
33
|
const { frontmatter: {title, userRequirement}, html } = data.markdownRemark
|
|
32
34
|
// if isAuthorized byoass the AUTHZ check
|
|
33
35
|
if (!isAuthorized && (
|
|
34
|
-
(userRequirement ===
|
|
36
|
+
(userRequirement === USER_REQUIREMENTS.loggedIn && !isLoggedUser) || (userRequirement === USER_REQUIREMENTS.hasTicket && !hasTicket)
|
|
35
37
|
)) {
|
|
36
38
|
return <Redirect to='/' noThrow />
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
return (
|
|
40
42
|
<Layout>
|
|
41
|
-
<
|
|
43
|
+
<ContentPageTemplate
|
|
42
44
|
contentComponent={HTMLContent}
|
|
43
45
|
title={title}
|
|
44
46
|
content={html}
|
|
@@ -47,7 +49,7 @@ const CustomPage = ({ data, isLoggedUser, hasTicket, isAuthorized }) => {
|
|
|
47
49
|
)
|
|
48
50
|
}
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
ContentPage.propTypes = {
|
|
51
53
|
data: PropTypes.shape({
|
|
52
54
|
markdownRemark: PropTypes.shape({
|
|
53
55
|
frontmatter: PropTypes.object,
|
|
@@ -63,9 +65,9 @@ const mapStateToProps = ({ loggedUserState, userState }) => ({
|
|
|
63
65
|
isAuthorized: userState.isAuthorized
|
|
64
66
|
});
|
|
65
67
|
|
|
66
|
-
export default connect(mapStateToProps, null)(
|
|
68
|
+
export default connect(mapStateToProps, null)(ContentPage);
|
|
67
69
|
|
|
68
|
-
export const
|
|
70
|
+
export const contentPageQuery = graphql`
|
|
69
71
|
query ($id: String!) {
|
|
70
72
|
markdownRemark(id: { eq: $id }) {
|
|
71
73
|
html
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import {navigate} from "gatsby";
|
|
4
4
|
import {connect} from "react-redux";
|
|
@@ -8,7 +8,7 @@ import Layout from "../components/Layout";
|
|
|
8
8
|
import DisqusComponent from "../components/DisqusComponent";
|
|
9
9
|
import AdvertiseComponent from "../components/AdvertiseComponent";
|
|
10
10
|
import Etherpad from "../components/Etherpad";
|
|
11
|
-
import { MemoizedVideoComponent as VideoComponent } from
|
|
11
|
+
import { MemoizedVideoComponent as VideoComponent } from "../components/VideoComponent";
|
|
12
12
|
import TalkComponent from "../components/TalkComponent";
|
|
13
13
|
import DocumentsComponent from "../components/DocumentsComponent";
|
|
14
14
|
import VideoBanner from "../components/VideoBanner";
|
|
@@ -19,285 +19,285 @@ import UpcomingEventsComponent from "../components/UpcomingEventsComponent";
|
|
|
19
19
|
import Link from "../components/Link";
|
|
20
20
|
import AccessTracker, {AttendeesWidget} from "../components/AttendeeToAttendeeWidgetComponent"
|
|
21
21
|
import AttendanceTrackerComponent from "../components/AttendanceTrackerComponent";
|
|
22
|
-
import EventFeedbackComponent from
|
|
23
|
-
import {PHASES} from
|
|
22
|
+
import EventFeedbackComponent from "../components/EventFeedbackComponent"
|
|
23
|
+
import {PHASES} from "../utils/phasesUtils";
|
|
24
24
|
import { getEventById } from "../actions/event-actions";
|
|
25
|
-
import useMarketingSettings from "@utils/useMarketingSettings";
|
|
26
25
|
import URI from "urijs";
|
|
27
|
-
|
|
26
|
+
import useMarketingSettings, { MARKETING_SETTINGS_KEYS } from "@utils/useMarketingSettings";
|
|
28
27
|
/**
|
|
29
28
|
* @type {EventPageTemplate}
|
|
30
29
|
*/
|
|
31
30
|
export const EventPageTemplate = class extends React.Component {
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
constructor(props) {
|
|
33
|
+
super(props);
|
|
34
|
+
this.onEventChange = this.onEventChange.bind(this);
|
|
35
|
+
this.canRenderVideo = this.canRenderVideo.bind(this);
|
|
36
|
+
}
|
|
38
37
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
38
|
+
onEventChange(ev) {
|
|
39
|
+
const {eventId} = this.props;
|
|
40
|
+
if (parseInt(eventId) !== parseInt(ev.id)) {
|
|
41
|
+
navigate(`/a/event/${ev.id}`);
|
|
44
42
|
}
|
|
43
|
+
}
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
45
|
+
shouldComponentUpdate(nextProps, nextState) {
|
|
46
|
+
const {eventId, event, eventsPhases, lastDataSync} = this.props;
|
|
47
|
+
if (eventId !== nextProps.eventId) return true;
|
|
48
|
+
if (!isEqual(event, nextProps.event)) return true;
|
|
49
|
+
// a synch did happened!
|
|
50
|
+
if(lastDataSync !== nextProps.lastDataSync) return true;
|
|
51
|
+
// compare current event phase with next one
|
|
52
|
+
const currentPhase = eventsPhases.find((e) => parseInt(e.id) === parseInt(eventId))?.phase;
|
|
53
|
+
const nextCurrentPhase = nextProps.eventsPhases.find(
|
|
54
|
+
(e) => parseInt(e.id) === parseInt(eventId)
|
|
55
|
+
)?.phase;
|
|
56
|
+
const finishing = (currentPhase === PHASES.DURING && nextCurrentPhase === PHASES.AFTER);
|
|
57
|
+
return (currentPhase !== nextCurrentPhase && !finishing );
|
|
58
|
+
}
|
|
60
59
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
canRenderVideo = (currentPhase) => {
|
|
61
|
+
const {event} = this.props;
|
|
62
|
+
return (currentPhase >= PHASES.DURING || event.streaming_type === 'VOD') && event.streaming_url;
|
|
63
|
+
};
|
|
65
64
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
65
|
+
componentDidUpdate(prevProps, prevState, snapshot) {
|
|
66
|
+
const {eventId, event} = this.props;
|
|
67
|
+
const {eventId: prevEventId} = prevProps;
|
|
68
|
+
// event id could come as param at uri
|
|
69
|
+
if (parseInt(eventId) !== parseInt(prevEventId) || parseInt(event?.id) !== parseInt(eventId)) {
|
|
70
|
+
this.props.getEventById(eventId);
|
|
73
71
|
}
|
|
72
|
+
}
|
|
74
73
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
74
|
+
componentDidMount() {
|
|
75
|
+
const {eventId, event } = this.props;
|
|
76
|
+
if (parseInt(event?.id) !== parseInt(eventId)) {
|
|
77
|
+
this.props.getEventById(eventId);
|
|
80
78
|
}
|
|
79
|
+
}
|
|
81
80
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
const {event, user, loading, nowUtc, summit, eventsPhases, eventId, lastDataSync, activityCtaText} = this.props;
|
|
85
|
-
// get current event phase
|
|
86
|
-
const currentPhaseInfo = eventsPhases.find((e) => parseInt(e.id) === parseInt(eventId));
|
|
87
|
-
const currentPhase = currentPhaseInfo?.phase;
|
|
88
|
-
console.log(`EventPageTemplate::render lastDataSync ${lastDataSync} currentPhase ${currentPhase}`, currentPhaseInfo);
|
|
89
|
-
const firstHalf = currentPhase === PHASES.DURING ? nowUtc < ((event?.start_date + event?.end_date) / 2) : false;
|
|
90
|
-
const eventQuery = event.streaming_url ? URI(event.streaming_url).search(true) : null;
|
|
91
|
-
const autoPlay = eventQuery?.autoplay !== '0';
|
|
92
|
-
// Start time set into seconds, first number is minutes so it multiply per 60
|
|
93
|
-
const startTime = eventQuery?.start?.split(',').reduce((a, b, index) => (index === 0 ? parseInt(b) * 60 : parseInt(b)) + a, 0);
|
|
94
|
-
|
|
95
|
-
// if event is loading or we are still calculating the current phase ...
|
|
96
|
-
if (loading || currentPhase === undefined || currentPhase === null) {
|
|
97
|
-
return <HeroComponent title="Loading event"/>;
|
|
98
|
-
}
|
|
81
|
+
render() {
|
|
99
82
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
83
|
+
const {event, user, loading, nowUtc, summit, eventsPhases, eventId, lastDataSync, activityCtaText} = this.props;
|
|
84
|
+
// get current event phase
|
|
85
|
+
const currentPhaseInfo = eventsPhases.find((e) => parseInt(e.id) === parseInt(eventId));
|
|
86
|
+
const currentPhase = currentPhaseInfo?.phase;
|
|
87
|
+
console.log(`EventPageTemplate::render lastDataSync ${lastDataSync} currentPhase ${currentPhase}`, currentPhaseInfo);
|
|
88
|
+
const firstHalf = currentPhase === PHASES.DURING ? nowUtc < ((event?.start_date + event?.end_date) / 2) : false;
|
|
89
|
+
const eventQuery = event.streaming_url ? URI(event.streaming_url).search(true) : null;
|
|
90
|
+
const autoPlay = eventQuery?.autoplay !== '0';
|
|
91
|
+
// Start time set into seconds, first number is minutes so it multiply per 60
|
|
92
|
+
const startTime = eventQuery?.start?.split(',').reduce((a, b, index) => (index === 0 ? parseInt(b) * 60 : parseInt(b)) + a, 0);
|
|
103
93
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
<section
|
|
108
|
-
className="section px-0 py-0"
|
|
109
|
-
style={{
|
|
110
|
-
marginBottom:
|
|
111
|
-
event.class_name !== "Presentation" ||
|
|
112
|
-
currentPhase < PHASES.DURING ||
|
|
113
|
-
!event.streaming_url
|
|
114
|
-
? "-3rem"
|
|
115
|
-
: "",
|
|
116
|
-
}}
|
|
117
|
-
>
|
|
118
|
-
<div className="columns is-gapless">
|
|
119
|
-
{this.canRenderVideo(currentPhase) ? (
|
|
120
|
-
<div className="column is-three-quarters px-0 py-0">
|
|
121
|
-
<VideoComponent
|
|
122
|
-
url={event.streaming_url}
|
|
123
|
-
title={event.title}
|
|
124
|
-
namespace={summit.name}
|
|
125
|
-
firstHalf={firstHalf}
|
|
126
|
-
autoPlay={autoPlay}
|
|
127
|
-
start={startTime}
|
|
128
|
-
/>
|
|
129
|
-
{event.meeting_url && <VideoBanner event={event} ctaText={activityCtaText} />}
|
|
130
|
-
</div>
|
|
131
|
-
) : (
|
|
132
|
-
<div className="column is-three-quarters px-0 py-0 is-full-mobile">
|
|
133
|
-
<NoTalkComponent
|
|
134
|
-
currentEventPhase={currentPhase}
|
|
135
|
-
event={event}
|
|
136
|
-
summit={summit}
|
|
137
|
-
/>
|
|
138
|
-
</div>
|
|
139
|
-
)}
|
|
140
|
-
<div
|
|
141
|
-
className="column is-hidden-mobile"
|
|
142
|
-
style={{
|
|
143
|
-
position: "relative",
|
|
144
|
-
borderBottom: "1px solid #d3d3d3",
|
|
145
|
-
}}
|
|
146
|
-
>
|
|
147
|
-
<DisqusComponent
|
|
148
|
-
hideMobile={true}
|
|
149
|
-
event={event}
|
|
150
|
-
title="Public Conversation"
|
|
151
|
-
/>
|
|
152
|
-
</div>
|
|
153
|
-
</div>
|
|
154
|
-
</section>
|
|
155
|
-
<section className="section px-0 pt-5 pb-0">
|
|
156
|
-
<div className="columns mx-0 my-0">
|
|
157
|
-
<div className="column is-three-quarters is-full-mobile">
|
|
158
|
-
<div className="px-5 py-5">
|
|
159
|
-
<TalkComponent
|
|
160
|
-
currentEventPhase={currentPhase}
|
|
161
|
-
event={event}
|
|
162
|
-
summit={summit}
|
|
163
|
-
/>
|
|
164
|
-
</div>
|
|
165
|
-
{ event.allow_feedback &&
|
|
166
|
-
<div className="px-5 py-5">
|
|
167
|
-
<EventFeedbackComponent eventId={event.id} />
|
|
168
|
-
</div>
|
|
169
|
-
}
|
|
170
|
-
<div className="px-5 py-0">
|
|
171
|
-
<SponsorComponent page="event"/>
|
|
172
|
-
</div>
|
|
173
|
-
<div className="is-hidden-tablet">
|
|
174
|
-
<DisqusComponent
|
|
175
|
-
hideMobile={false}
|
|
176
|
-
event={event}
|
|
177
|
-
title="Public Conversation"
|
|
178
|
-
/>
|
|
179
|
-
∆
|
|
180
|
-
</div>
|
|
181
|
-
{event.etherpad_link && (
|
|
182
|
-
<div className="column is-three-quarters">
|
|
183
|
-
<Etherpad
|
|
184
|
-
className="talk__etherpad"
|
|
185
|
-
etherpad_link={event.etherpad_link}
|
|
186
|
-
userName={user.userProfile.first_name}
|
|
187
|
-
/>
|
|
188
|
-
</div>
|
|
189
|
-
)}
|
|
190
|
-
<UpcomingEventsComponent
|
|
191
|
-
key={`event_page_upcomming_event_${lastDataSync}`}
|
|
192
|
-
id={`event_page_upcomming_event_${lastDataSync}`}
|
|
193
|
-
trackId={event.track ? event.track.id : null}
|
|
194
|
-
eventCount={3}
|
|
195
|
-
title={
|
|
196
|
-
event.track
|
|
197
|
-
? `Up Next on ${event.track.name}`
|
|
198
|
-
: "Up Next"
|
|
199
|
-
}
|
|
200
|
-
renderEventLink={(event) => <Link to={`/a/event/${event.id}`}>{event.title}</Link>}
|
|
201
|
-
allEventsLink={
|
|
202
|
-
<Link to={event.track ? `/a/schedule#track=${event.track.id}` : "/a/schedule"}>
|
|
203
|
-
View all <span className="sr-only">events</span>
|
|
204
|
-
</Link>
|
|
205
|
-
}
|
|
206
|
-
/>
|
|
207
|
-
</div>
|
|
208
|
-
<div className="column px-0 py-0 is-one-quarter is-full-mobile">
|
|
209
|
-
<DocumentsComponent event={event}/>
|
|
210
|
-
<AccessTracker/>
|
|
211
|
-
<AttendeesWidget user={user} event={event}/>
|
|
212
|
-
<AdvertiseComponent section="event" column="right"/>
|
|
213
|
-
</div>
|
|
214
|
-
</div>
|
|
215
|
-
</section>
|
|
216
|
-
</React.Fragment>
|
|
217
|
-
);
|
|
94
|
+
// if event is loading or we are still calculating the current phase ...
|
|
95
|
+
if (loading || currentPhase === undefined || currentPhase === null) {
|
|
96
|
+
return <HeroComponent title="Loading event"/>;
|
|
218
97
|
}
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
const EventPage = ({
|
|
222
|
-
summit,
|
|
223
|
-
location,
|
|
224
|
-
loading,
|
|
225
|
-
event,
|
|
226
|
-
eventId,
|
|
227
|
-
user,
|
|
228
|
-
eventsPhases,
|
|
229
|
-
nowUtc,
|
|
230
|
-
getEventById,
|
|
231
|
-
lastUpdate,
|
|
232
|
-
lastDataSync
|
|
233
|
-
}) => {
|
|
234
|
-
|
|
235
|
-
const {
|
|
236
|
-
MARKETING_SETTINGS_KEYS,
|
|
237
|
-
getSettingByKey
|
|
238
|
-
} = useMarketingSettings();
|
|
239
98
|
|
|
240
|
-
|
|
99
|
+
if (!event) {
|
|
100
|
+
return <HeroComponent title="Event not found" redirectTo="/a/schedule"/>;
|
|
101
|
+
}
|
|
241
102
|
|
|
242
103
|
return (
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
104
|
+
<React.Fragment>
|
|
105
|
+
{/* <EventHeroComponent /> */}
|
|
106
|
+
<section
|
|
107
|
+
className="section px-0 py-0"
|
|
108
|
+
style={{
|
|
109
|
+
marginBottom:
|
|
110
|
+
event.class_name !== "Presentation" ||
|
|
111
|
+
currentPhase < PHASES.DURING ||
|
|
112
|
+
!event.streaming_url
|
|
113
|
+
? "-3rem"
|
|
114
|
+
: "",
|
|
115
|
+
}}
|
|
116
|
+
>
|
|
117
|
+
<div className="columns is-gapless">
|
|
118
|
+
{this.canRenderVideo(currentPhase) ? (
|
|
119
|
+
<div className="column is-three-quarters px-0 py-0">
|
|
120
|
+
<VideoComponent
|
|
121
|
+
url={event.streaming_url}
|
|
122
|
+
title={event.title}
|
|
123
|
+
namespace={summit.name}
|
|
124
|
+
firstHalf={firstHalf}
|
|
125
|
+
autoPlay={autoPlay}
|
|
126
|
+
start={startTime}
|
|
127
|
+
/>
|
|
128
|
+
{event.meeting_url && <VideoBanner event={event} ctaText={activityCtaText} />}
|
|
129
|
+
</div>
|
|
130
|
+
) : (
|
|
131
|
+
<div className="column is-three-quarters px-0 py-0 is-full-mobile">
|
|
132
|
+
<NoTalkComponent
|
|
133
|
+
currentEventPhase={currentPhase}
|
|
134
|
+
event={event}
|
|
135
|
+
summit={summit}
|
|
249
136
|
/>
|
|
137
|
+
</div>
|
|
250
138
|
)}
|
|
251
|
-
<
|
|
252
|
-
|
|
139
|
+
<div
|
|
140
|
+
className="column is-hidden-mobile"
|
|
141
|
+
style={{
|
|
142
|
+
position: "relative",
|
|
143
|
+
borderBottom: "1px solid #d3d3d3",
|
|
144
|
+
}}
|
|
145
|
+
>
|
|
146
|
+
<DisqusComponent
|
|
147
|
+
hideMobile={true}
|
|
253
148
|
event={event}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
149
|
+
title="Public Conversation"
|
|
150
|
+
/>
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
</section>
|
|
154
|
+
<section className="section px-0 pt-5 pb-0">
|
|
155
|
+
<div className="columns mx-0 my-0">
|
|
156
|
+
<div className="column is-three-quarters is-full-mobile">
|
|
157
|
+
<div className="px-5 py-5">
|
|
158
|
+
<TalkComponent
|
|
159
|
+
currentEventPhase={currentPhase}
|
|
160
|
+
event={event}
|
|
161
|
+
summit={summit}
|
|
162
|
+
/>
|
|
163
|
+
</div>
|
|
164
|
+
{ event.allow_feedback &&
|
|
165
|
+
<div className="px-5 py-5">
|
|
166
|
+
<EventFeedbackComponent eventId={event.id} />
|
|
167
|
+
</div>
|
|
168
|
+
}
|
|
169
|
+
<div className="px-5 py-0">
|
|
170
|
+
<SponsorComponent page="event"/>
|
|
171
|
+
</div>
|
|
172
|
+
<div className="is-hidden-tablet">
|
|
173
|
+
<DisqusComponent
|
|
174
|
+
hideMobile={false}
|
|
175
|
+
event={event}
|
|
176
|
+
title="Public Conversation"
|
|
177
|
+
/>
|
|
178
|
+
</div>
|
|
179
|
+
{event.etherpad_link && (
|
|
180
|
+
<div className="column is-three-quarters">
|
|
181
|
+
<Etherpad
|
|
182
|
+
className="talk__etherpad"
|
|
183
|
+
etherpad_link={event.etherpad_link}
|
|
184
|
+
userName={user.userProfile.first_name}
|
|
185
|
+
/>
|
|
186
|
+
</div>
|
|
187
|
+
)}
|
|
188
|
+
<UpcomingEventsComponent
|
|
189
|
+
key={`event_page_upcomming_event_${lastDataSync}`}
|
|
190
|
+
id={`event_page_upcomming_event_${lastDataSync}`}
|
|
191
|
+
trackId={event.track ? event.track.id : null}
|
|
192
|
+
eventCount={3}
|
|
193
|
+
title={
|
|
194
|
+
event.track
|
|
195
|
+
? `Up Next on ${event.track.name}`
|
|
196
|
+
: "Up Next"
|
|
197
|
+
}
|
|
198
|
+
renderEventLink={(event) => <Link to={`/a/event/${event.id}`}>{event.title}</Link>}
|
|
199
|
+
allEventsLink={
|
|
200
|
+
<Link to={event.track ? `/a/schedule#track=${event.track.id}` : "/a/schedule"}>
|
|
201
|
+
View all <span className="sr-only">events</span>
|
|
202
|
+
</Link>
|
|
203
|
+
}
|
|
204
|
+
/>
|
|
205
|
+
</div>
|
|
206
|
+
<div className="column px-0 py-0 is-one-quarter is-full-mobile">
|
|
207
|
+
<DocumentsComponent event={event}/>
|
|
208
|
+
<AccessTracker/>
|
|
209
|
+
<AttendeesWidget user={user} event={event}/>
|
|
210
|
+
<AdvertiseComponent section="event" column="right"/>
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
</section>
|
|
214
|
+
</React.Fragment>
|
|
266
215
|
);
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
const EventPage = ({
|
|
220
|
+
summit,
|
|
221
|
+
location,
|
|
222
|
+
loading,
|
|
223
|
+
event,
|
|
224
|
+
eventId,
|
|
225
|
+
user,
|
|
226
|
+
eventsPhases,
|
|
227
|
+
nowUtc,
|
|
228
|
+
getEventById,
|
|
229
|
+
lastUpdate,
|
|
230
|
+
lastDataSync
|
|
231
|
+
}) => {
|
|
232
|
+
|
|
233
|
+
const { getSettingByKey } = useMarketingSettings();
|
|
234
|
+
const activityCtaText = getSettingByKey(MARKETING_SETTINGS_KEYS.activityCtaText);
|
|
235
|
+
|
|
236
|
+
return (
|
|
237
|
+
<Layout location={location}>
|
|
238
|
+
{event && event.id && (
|
|
239
|
+
<AttendanceTrackerComponent
|
|
240
|
+
key={`att-tracker-${event.id}`}
|
|
241
|
+
sourceId={event.id}
|
|
242
|
+
sourceName="EVENT"
|
|
243
|
+
/>
|
|
244
|
+
)}
|
|
245
|
+
<EventPageTemplate
|
|
246
|
+
summit={summit}
|
|
247
|
+
event={event}
|
|
248
|
+
eventId={eventId}
|
|
249
|
+
loading={loading}
|
|
250
|
+
user={user}
|
|
251
|
+
eventsPhases={eventsPhases}
|
|
252
|
+
nowUtc={nowUtc}
|
|
253
|
+
location={location}
|
|
254
|
+
getEventById={getEventById}
|
|
255
|
+
lastUpdate={lastUpdate}
|
|
256
|
+
activityCtaText={activityCtaText}
|
|
257
|
+
lastDataSync={lastDataSync}
|
|
258
|
+
/>
|
|
259
|
+
</Layout>
|
|
260
|
+
);
|
|
267
261
|
};
|
|
268
262
|
|
|
269
263
|
EventPage.propTypes = {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
264
|
+
loading: PropTypes.bool,
|
|
265
|
+
event: PropTypes.object,
|
|
266
|
+
lastUpdate: PropTypes.object,
|
|
267
|
+
eventId: PropTypes.string,
|
|
268
|
+
user: PropTypes.object,
|
|
269
|
+
eventsPhases: PropTypes.array,
|
|
270
|
+
getEventById: PropTypes.func,
|
|
277
271
|
};
|
|
278
272
|
|
|
279
273
|
EventPageTemplate.propTypes = {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
274
|
+
event: PropTypes.object,
|
|
275
|
+
lastUpdate: PropTypes.object,
|
|
276
|
+
loading: PropTypes.bool,
|
|
277
|
+
eventId: PropTypes.string,
|
|
278
|
+
user: PropTypes.object,
|
|
279
|
+
eventsPhases: PropTypes.array,
|
|
280
|
+
getEventById: PropTypes.func,
|
|
281
|
+
activityCtaText: PropTypes.string,
|
|
288
282
|
};
|
|
289
283
|
|
|
290
|
-
const mapStateToProps = ({
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
284
|
+
const mapStateToProps = ({
|
|
285
|
+
eventState,
|
|
286
|
+
summitState,
|
|
287
|
+
userState,
|
|
288
|
+
clockState,
|
|
289
|
+
settingState
|
|
290
|
+
}) => ({
|
|
291
|
+
loading: eventState.loading,
|
|
292
|
+
event: eventState.event,
|
|
293
|
+
user: userState,
|
|
294
|
+
summit: summitState.summit,
|
|
295
|
+
eventsPhases: clockState.events_phases,
|
|
296
|
+
nowUtc: clockState.nowUtc,
|
|
297
|
+
lastUpdate: eventState.lastUpdate,
|
|
298
|
+
lastDataSync: settingState.lastDataSync,
|
|
299
299
|
});
|
|
300
300
|
|
|
301
301
|
export default connect(mapStateToProps, {
|
|
302
|
-
|
|
303
|
-
})(EventPage);
|
|
302
|
+
getEventById,
|
|
303
|
+
})(EventPage);
|