@openeventkit/event-site 1.0.44 → 1.0.46
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/package.json +1 -1
- package/src/cms/config/collections/defaultPagesCollection/lobbyPage/typeDefs.js +1 -1
- package/src/components/AttendeeToAttendeeWidgetComponent.js +1 -1
- package/src/pages/a/[...].js +15 -17
- package/src/pages/a/index.js +75 -0
- package/src/reducers/setting-reducer.js +0 -2
- package/src/routes/ShowOpenRoute.js +7 -7
- package/src/templates/lobby-page.js +15 -11
- package/src/content/lobby-page/index.json +0 -1
package/package.json
CHANGED
|
@@ -199,7 +199,7 @@ const AccessTracker = ({ user, isLoggedUser, summitPhase }) => {
|
|
|
199
199
|
return user.isAuthorized;
|
|
200
200
|
};
|
|
201
201
|
|
|
202
|
-
// if
|
|
202
|
+
// if summitPhase wasn't initialized yet (eg: due to a delay in the reducer),
|
|
203
203
|
// this render shouldn't continue
|
|
204
204
|
if (summitPhase === null) return null;
|
|
205
205
|
|
package/src/pages/a/[...].js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Router, Location } from "@reach/router";
|
|
3
3
|
import { connect } from "react-redux";
|
|
4
|
-
import LobbyPage from "../../templates/lobby-page";
|
|
5
4
|
import EventPage from "../../templates/event-page";
|
|
6
5
|
import PostersPage from "../../templates/posters-page";
|
|
7
6
|
import SchedulePage from "../../templates/schedule-page";
|
|
8
|
-
import SponsorPage from "../../templates/sponsor-page"
|
|
9
|
-
import ExpoHallPage from "../../templates/expo-hall-page"
|
|
10
|
-
import FullProfilePage from "../../templates/full-profile-page"
|
|
11
|
-
import WithAuthzRoute from "../../routes/WithAuthzRoute"
|
|
7
|
+
import SponsorPage from "../../templates/sponsor-page";
|
|
8
|
+
import ExpoHallPage from "../../templates/expo-hall-page";
|
|
9
|
+
import FullProfilePage from "../../templates/full-profile-page";
|
|
10
|
+
import WithAuthzRoute from "../../routes/WithAuthzRoute";
|
|
12
11
|
import WithAuthRoute from "../../routes/WithAuthRoute";
|
|
13
|
-
import ExtraQuestionsPage from "../../templates/extra-questions-page"
|
|
12
|
+
import ExtraQuestionsPage from "../../templates/extra-questions-page";
|
|
14
13
|
import ShowOpenRoute from "../../routes/ShowOpenRoute";
|
|
15
14
|
import WithBadgeRoute from "../../routes/WithBadgeRoute";
|
|
16
15
|
import PosterDetailPage from "../../templates/poster-detail-page";
|
|
@@ -22,7 +21,7 @@ import Seo from "../../components/Seo";
|
|
|
22
21
|
import Link from "../../components/Link";
|
|
23
22
|
import { titleFromPathname } from "../../utils/urlFormating";
|
|
24
23
|
|
|
25
|
-
const App = ({ isLoggedUser, user,
|
|
24
|
+
const App = ({ isLoggedUser, user, summitPhase, allowClick = true }) => {
|
|
26
25
|
return (
|
|
27
26
|
<Location>
|
|
28
27
|
{({ location }) => (
|
|
@@ -38,18 +37,18 @@ const App = ({ isLoggedUser, user, summit_phase, allowClick = true }) => {
|
|
|
38
37
|
/>
|
|
39
38
|
<WithAuthRoute path="/" isLoggedIn={isLoggedUser} location={location}>
|
|
40
39
|
<MyTicketsPage path="/my-tickets" isLoggedIn={isLoggedUser} user={user} location={location} />
|
|
41
|
-
<FullProfilePage path="/profile"
|
|
40
|
+
<FullProfilePage path="/profile" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location} />
|
|
42
41
|
<WithTicketRoute path="/extra-questions" location={location}>
|
|
43
42
|
<ExtraQuestionsPage path="/" isLoggedIn={isLoggedUser} user={user} location={location} />
|
|
44
43
|
</WithTicketRoute>
|
|
45
|
-
<WithAuthzRoute path="/"
|
|
44
|
+
<WithAuthzRoute path="/" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location}>
|
|
46
45
|
<PostersPage path="/posters" trackGroupId={0} location={location} />
|
|
47
46
|
<PostersPage path="/posters/:trackGroupId" location={location} />
|
|
48
47
|
<PosterDetailPage path="/poster/:presentationId/" isLoggedIn={isLoggedUser} user={user} location={location} />
|
|
49
48
|
<SchedulePage
|
|
50
49
|
path="/my-schedule"
|
|
51
50
|
location={location}
|
|
52
|
-
|
|
51
|
+
summitPhase={summitPhase}
|
|
53
52
|
isLoggedIn={isLoggedUser}
|
|
54
53
|
user={user}
|
|
55
54
|
scheduleProps={{
|
|
@@ -60,13 +59,12 @@ const App = ({ isLoggedUser, user, summit_phase, allowClick = true }) => {
|
|
|
60
59
|
schedKey="my-schedule-main"
|
|
61
60
|
allowClick={allowClick}
|
|
62
61
|
/>
|
|
63
|
-
<ShowOpenRoute path="/"
|
|
64
|
-
<WithBadgeRoute path="/event/:eventId"
|
|
65
|
-
<EventPage path="/"
|
|
62
|
+
<ShowOpenRoute path="/" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location}>
|
|
63
|
+
<WithBadgeRoute path="/event/:eventId" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location}>
|
|
64
|
+
<EventPage path="/" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location} />
|
|
66
65
|
</WithBadgeRoute>
|
|
67
|
-
<
|
|
68
|
-
<
|
|
69
|
-
<ExpoHallPage path="/sponsors/" summit_phase={summit_phase} isLoggedIn={isLoggedUser} user={user} location={location} />
|
|
66
|
+
<SponsorPage path="/sponsor/:sponsorId" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location} />
|
|
67
|
+
<ExpoHallPage path="/sponsors/" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location} />
|
|
70
68
|
</ShowOpenRoute>
|
|
71
69
|
</WithAuthzRoute>
|
|
72
70
|
</WithAuthRoute>
|
|
@@ -78,7 +76,7 @@ const App = ({ isLoggedUser, user, summit_phase, allowClick = true }) => {
|
|
|
78
76
|
|
|
79
77
|
const mapStateToProps = ({ loggedUserState, userState, clockState, settingState, summitState }) => ({
|
|
80
78
|
isLoggedUser: loggedUserState.isLoggedUser,
|
|
81
|
-
|
|
79
|
+
summitPhase: clockState.summit_phase,
|
|
82
80
|
user: userState,
|
|
83
81
|
summitId: summitState?.summit?.id,
|
|
84
82
|
lastBuild: settingState.lastBuild,
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { graphql } from "gatsby";
|
|
3
|
+
import { Router, Location } from "@reach/router";
|
|
4
|
+
import { connect } from "react-redux";
|
|
5
|
+
import LobbyPage from "../../templates/lobby-page";
|
|
6
|
+
import WithAuthzRoute from "../../routes/WithAuthzRoute";
|
|
7
|
+
import WithAuthRoute from "../../routes/WithAuthRoute";
|
|
8
|
+
import ShowOpenRoute from "../../routes/ShowOpenRoute";
|
|
9
|
+
import withRealTimeUpdates from "../../utils/real_time_updates/withRealTimeUpdates";
|
|
10
|
+
import withFeedsWorker from "../../utils/withFeedsWorker";
|
|
11
|
+
import Seo from "../../components/Seo";
|
|
12
|
+
|
|
13
|
+
export const lobbyPageQuery = graphql`
|
|
14
|
+
query {
|
|
15
|
+
lobbyPageJson {
|
|
16
|
+
hero {
|
|
17
|
+
title
|
|
18
|
+
subTitle
|
|
19
|
+
background {
|
|
20
|
+
src {
|
|
21
|
+
childImageSharp {
|
|
22
|
+
gatsbyImageData (
|
|
23
|
+
quality: 100
|
|
24
|
+
placeholder: BLURRED
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
alt
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
centerColumn {
|
|
32
|
+
speakers {
|
|
33
|
+
showTodaySpeakers
|
|
34
|
+
showFeatureSpeakers
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
liveNowFeaturedEventId
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
`;
|
|
41
|
+
|
|
42
|
+
const App = ({ data, isLoggedUser, user, summitPhase }) => {
|
|
43
|
+
return (
|
|
44
|
+
<Location>
|
|
45
|
+
{({ location }) => (
|
|
46
|
+
<Router basepath="/a" >
|
|
47
|
+
<WithAuthRoute path="/" isLoggedIn={isLoggedUser} location={location}>
|
|
48
|
+
<WithAuthzRoute path="/" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location}>
|
|
49
|
+
<ShowOpenRoute path="/" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location}>
|
|
50
|
+
<LobbyPage path="/" data={data} isLoggedIn={isLoggedUser} user={user} location={location} />
|
|
51
|
+
</ShowOpenRoute>
|
|
52
|
+
</WithAuthzRoute>
|
|
53
|
+
</WithAuthRoute>
|
|
54
|
+
</Router>
|
|
55
|
+
)}
|
|
56
|
+
</Location>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const mapStateToProps = ({ loggedUserState, userState, clockState }) => ({
|
|
61
|
+
isLoggedUser: loggedUserState.isLoggedUser,
|
|
62
|
+
summitPhase: clockState.summit_phase,
|
|
63
|
+
user: userState
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
export default connect(mapStateToProps, {})(withFeedsWorker(withRealTimeUpdates(App)));
|
|
67
|
+
|
|
68
|
+
export const Head = ({
|
|
69
|
+
location
|
|
70
|
+
}) => (
|
|
71
|
+
<Seo
|
|
72
|
+
title={"Lobby"}
|
|
73
|
+
pathname={location.pathname}
|
|
74
|
+
/>
|
|
75
|
+
);
|
|
@@ -5,7 +5,6 @@ import { RESET_STATE, SYNC_DATA, UPDATE_LAST_CHECK_FOR_NOVELTIES } from "../acti
|
|
|
5
5
|
import colors from "data/colors.json";
|
|
6
6
|
// TODO: dont store build timestamps in site-settings, use another file
|
|
7
7
|
import settings from "content/site-settings/index.json";
|
|
8
|
-
import lobbyPageSettings from "content/lobby-page/index.json";
|
|
9
8
|
// TODO: should this live in reducer or should be accessed though graphql?
|
|
10
9
|
import marketingPageSettings from "content/marketing-page/index.json";
|
|
11
10
|
import postersPages from "content/posters-pages.json";
|
|
@@ -20,7 +19,6 @@ const DEFAULT_STATE = {
|
|
|
20
19
|
widgets: settings.widgets,
|
|
21
20
|
colorSettings: colors,
|
|
22
21
|
marketingPageSettings: marketingPageSettings,
|
|
23
|
-
lobbyPageSettings: lobbyPageSettings,
|
|
24
22
|
posterPagesSettings: postersPages,
|
|
25
23
|
// this keeps tracks of last data synch
|
|
26
24
|
lastDataSync: settings.lastBuild,
|
|
@@ -11,7 +11,7 @@ import moment from "moment-timezone";
|
|
|
11
11
|
*
|
|
12
12
|
* @param children
|
|
13
13
|
* @param isAuthorized
|
|
14
|
-
* @param
|
|
14
|
+
* @param summitPhase
|
|
15
15
|
* @param requireExtraQuestions
|
|
16
16
|
* @param hasTicket
|
|
17
17
|
* @param userProfile
|
|
@@ -22,7 +22,7 @@ import moment from "moment-timezone";
|
|
|
22
22
|
const ShowOpenRoute = ({
|
|
23
23
|
children,
|
|
24
24
|
isAuthorized,
|
|
25
|
-
|
|
25
|
+
summitPhase,
|
|
26
26
|
requireExtraQuestions,
|
|
27
27
|
hasTicket,
|
|
28
28
|
userProfile,
|
|
@@ -31,21 +31,21 @@ const ShowOpenRoute = ({
|
|
|
31
31
|
|
|
32
32
|
// if we are at show time, and we have an attendee, perform virtual check-in
|
|
33
33
|
useEffect(() => {
|
|
34
|
-
if(hasTicket &&
|
|
34
|
+
if(hasTicket && summitPhase === PHASES.DURING){
|
|
35
35
|
// verify if we have an attendee , and if so do the virtual check in
|
|
36
36
|
let attendee = userProfile?.summit_tickets[0]?.owner || null;
|
|
37
37
|
if(attendee)
|
|
38
38
|
doVirtualCheckIn(attendee);
|
|
39
39
|
}
|
|
40
|
-
},[
|
|
40
|
+
},[summitPhase, hasTicket, userProfile, doVirtualCheckIn]);
|
|
41
41
|
|
|
42
42
|
const userCanByPassAuthz = () => {
|
|
43
43
|
return isAuthorized;
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
// if
|
|
46
|
+
// if summitPhase wasn't initialized yet (eg: due to a delay in the reducer),
|
|
47
47
|
// this render shouldn't continue
|
|
48
|
-
if (
|
|
48
|
+
if (summitPhase === null) return null;
|
|
49
49
|
|
|
50
50
|
// if we are providing the now fragment param then let the clock
|
|
51
51
|
// component set it, so we need to bypass this next check
|
|
@@ -60,7 +60,7 @@ const ShowOpenRoute = ({
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
// if summit didnt started yet ...
|
|
63
|
-
if (!shouldBypassCheck && !userCanByPassAuthz() &&
|
|
63
|
+
if (!shouldBypassCheck && !userCanByPassAuthz() && summitPhase === PHASES.BEFORE) {
|
|
64
64
|
return <HeroComponent title="You are now logged in. Additional event info is now available on the website." redirectTo="/" />;
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import { navigate } from "gatsby";
|
|
4
|
+
import { getSrc } from "gatsby-plugin-image";
|
|
4
5
|
import { connect } from "react-redux";
|
|
5
6
|
|
|
6
7
|
import Layout from "../components/Layout";
|
|
@@ -41,13 +42,15 @@ export const LobbyPageTemplate = class extends React.Component {
|
|
|
41
42
|
const {
|
|
42
43
|
user,
|
|
43
44
|
summit,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
data: {
|
|
46
|
+
lobbyPageJson: {
|
|
47
|
+
hero,
|
|
48
|
+
centerColumn,
|
|
49
|
+
liveNowFeaturedEventId
|
|
50
|
+
}
|
|
48
51
|
},
|
|
49
52
|
lastDataSync
|
|
50
|
-
|
|
53
|
+
} = this.props;
|
|
51
54
|
|
|
52
55
|
return (
|
|
53
56
|
<>
|
|
@@ -55,7 +58,7 @@ export const LobbyPageTemplate = class extends React.Component {
|
|
|
55
58
|
<PageHeader
|
|
56
59
|
title={hero.title}
|
|
57
60
|
subtitle={hero.subTitle}
|
|
58
|
-
backgroundImageSrc={hero.background
|
|
61
|
+
backgroundImageSrc={hero.background ? getSrc(hero.background.src) : null}
|
|
59
62
|
/>
|
|
60
63
|
}
|
|
61
64
|
<div className="px-5 py-5 mb-6">
|
|
@@ -139,31 +142,33 @@ const OrchestedTemplate = withOrchestra(LobbyPageTemplate);
|
|
|
139
142
|
const LobbyPage = (
|
|
140
143
|
{
|
|
141
144
|
location,
|
|
145
|
+
data,
|
|
142
146
|
user,
|
|
143
147
|
getUserProfile,
|
|
144
148
|
summit,
|
|
145
|
-
lastDataSync
|
|
146
|
-
lobbyPageSettings
|
|
149
|
+
lastDataSync
|
|
147
150
|
}
|
|
148
151
|
) => (
|
|
149
152
|
<Layout location={location}>
|
|
150
153
|
<AttendanceTrackerComponent sourceName="LOBBY"/>
|
|
151
154
|
<OrchestedTemplate
|
|
152
155
|
user={user}
|
|
156
|
+
data={data}
|
|
153
157
|
getUserProfile={getUserProfile}
|
|
154
158
|
summit={summit}
|
|
155
159
|
lastDataSync={lastDataSync}
|
|
156
|
-
lobbyPageSettings={lobbyPageSettings}
|
|
157
160
|
/>
|
|
158
161
|
</Layout>
|
|
159
162
|
);
|
|
160
163
|
|
|
161
164
|
LobbyPage.propTypes = {
|
|
165
|
+
data: PropTypes.object,
|
|
162
166
|
user: PropTypes.object,
|
|
163
167
|
getUserProfile: PropTypes.func
|
|
164
168
|
};
|
|
165
169
|
|
|
166
170
|
LobbyPageTemplate.propTypes = {
|
|
171
|
+
data: PropTypes.object,
|
|
167
172
|
user: PropTypes.object,
|
|
168
173
|
getUserProfile: PropTypes.func
|
|
169
174
|
};
|
|
@@ -171,8 +176,7 @@ LobbyPageTemplate.propTypes = {
|
|
|
171
176
|
const mapStateToProps = ({userState, summitState, settingState}) => ({
|
|
172
177
|
user: userState,
|
|
173
178
|
summit: summitState.summit,
|
|
174
|
-
lastDataSync: settingState.lastDataSync
|
|
175
|
-
lobbyPageSettings: settingState.lobbyPageSettings,
|
|
179
|
+
lastDataSync: settingState.lastDataSync
|
|
176
180
|
});
|
|
177
181
|
|
|
178
182
|
export default connect(mapStateToProps, {getUserProfile})(LobbyPage);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|