@openeventkit/event-site 1.0.7 → 1.0.10
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-config.js +4 -3
- package/gatsby-node.js +123 -94
- package/package.json +2 -3
- package/src/components/Layout.js +2 -2
- package/src/components/LoginButton.js +12 -7
- package/src/components/Navbar/index.js +6 -4
- package/src/components/Navbar/template.js +0 -2
- package/src/components/RegistrationLiteComponent.js +19 -14
- package/.netlify/plugins/package-lock.json +0 -2520
- package/.netlify/plugins/package.json +0 -12
- package/src/components/Header.js +0 -34
- package/src/data/events.idx.json +0 -1
- package/src/data/events.json +0 -1
- package/src/data/speakers.idx.json +0 -1
- package/src/data/speakers.json +0 -1
- package/src/data/summit.json +0 -1
- package/src/data/voteable-presentations.json +0 -1
- package/yarn-error.log +0 -18082
package/gatsby-config.js
CHANGED
|
@@ -113,13 +113,14 @@ module.exports = {
|
|
|
113
113
|
customizeWebpackConfig: (config) => {
|
|
114
114
|
/**
|
|
115
115
|
* Forces transpiliation of solution js files; required for theming.
|
|
116
|
-
* @see https://
|
|
116
|
+
* @see https://www.gatsbyjs.com/docs/how-to/custom-configuration/add-custom-webpack-config/#modifying-the-babel-loader
|
|
117
117
|
*/
|
|
118
|
-
const
|
|
119
|
-
const jsTest =
|
|
118
|
+
const jsTestString = "\\.(js|mjs|jsx|ts|tsx)$";
|
|
119
|
+
const jsTest = new RegExp(jsTestString);
|
|
120
120
|
const jsRule = config.module.rules.find(
|
|
121
121
|
(rule) => String(rule.test) === String(jsTest)
|
|
122
122
|
);
|
|
123
|
+
const solutionJsTest = new RegExp(`${__dirname}(.*)${jsTestString}`);
|
|
123
124
|
const jsRuleInclude = jsRule.include;
|
|
124
125
|
jsRule.include = (modulePath) => {
|
|
125
126
|
if (solutionJsTest.test(modulePath)) return true;
|
package/gatsby-node.js
CHANGED
|
@@ -37,7 +37,7 @@ const getAccessToken = async (config, scope) => {
|
|
|
37
37
|
try {
|
|
38
38
|
return await client.getToken({ scope });
|
|
39
39
|
} catch (error) {
|
|
40
|
-
console.log(
|
|
40
|
+
console.log("Access Token error", error);
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
|
|
@@ -54,7 +54,7 @@ const SSR_getMarketingSettings = async (baseUrl, summitId) => {
|
|
|
54
54
|
.then(response => {
|
|
55
55
|
return response.data.data
|
|
56
56
|
})
|
|
57
|
-
.catch(e => console.log(
|
|
57
|
+
.catch(e => console.log("ERROR: ", e));
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
const SSR_GetRemainingPages = async (endpoint, params, lastPage) => {
|
|
@@ -84,7 +84,7 @@ const SSR_getEvents = async (baseUrl, summitId, accessToken) => {
|
|
|
84
84
|
access_token: accessToken,
|
|
85
85
|
per_page: 50,
|
|
86
86
|
page: 1,
|
|
87
|
-
expand:
|
|
87
|
+
expand: "slides, links, videos, media_uploads, type, track, track.allowed_access_levels, location, location.venue, location.floor, speakers, moderator, sponsors, current_attendance, groups, rsvp_template, tags",
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
return await axios.get(endpoint, { params }).then(async ({data}) => {
|
|
@@ -95,7 +95,7 @@ const SSR_getEvents = async (baseUrl, summitId, accessToken) => {
|
|
|
95
95
|
|
|
96
96
|
return [...data.data, ...remainingPages];
|
|
97
97
|
|
|
98
|
-
}).catch(e => console.log(
|
|
98
|
+
}).catch(e => console.log("ERROR: ", e));
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
const SSR_getSpeakers = async (baseUrl, summitId, accessToken, filter = null) => {
|
|
@@ -109,7 +109,7 @@ const SSR_getSpeakers = async (baseUrl, summitId, accessToken, filter = null) =>
|
|
|
109
109
|
const endpoint = `${baseUrl}/api/v1/summits/${summitId}/speakers/on-schedule`;
|
|
110
110
|
|
|
111
111
|
if (filter) {
|
|
112
|
-
params[
|
|
112
|
+
params["filter[]"] = filter;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
return await axios.get(
|
|
@@ -123,13 +123,13 @@ const SSR_getSpeakers = async (baseUrl, summitId, accessToken, filter = null) =>
|
|
|
123
123
|
|
|
124
124
|
return [ ...data.data, ...remainingPages];
|
|
125
125
|
})
|
|
126
|
-
.catch(e => console.log(
|
|
126
|
+
.catch(e => console.log("ERROR: ", e));
|
|
127
127
|
};
|
|
128
128
|
|
|
129
129
|
const SSR_getSummit = async (baseUrl, summitId) => {
|
|
130
130
|
|
|
131
131
|
const params = {
|
|
132
|
-
expand:
|
|
132
|
+
expand: "event_types,tracks,track_groups,presentation_levels,locations.rooms,locations.floors,order_extra_questions.values,schedule_settings,schedule_settings.filters,schedule_settings.pre_filters",
|
|
133
133
|
t: Date.now()
|
|
134
134
|
};
|
|
135
135
|
|
|
@@ -138,7 +138,7 @@ const SSR_getSummit = async (baseUrl, summitId) => {
|
|
|
138
138
|
{ params }
|
|
139
139
|
)
|
|
140
140
|
.then(({ data }) => data)
|
|
141
|
-
.catch(e => console.log(
|
|
141
|
+
.catch(e => console.log("ERROR: ", e));
|
|
142
142
|
};
|
|
143
143
|
|
|
144
144
|
const SSR_getVoteablePresentations = async (baseUrl, summitId, accessToken) => {
|
|
@@ -149,8 +149,8 @@ const SSR_getVoteablePresentations = async (baseUrl, summitId, accessToken) => {
|
|
|
149
149
|
access_token: accessToken,
|
|
150
150
|
per_page: 50,
|
|
151
151
|
page: 1,
|
|
152
|
-
filter:
|
|
153
|
-
expand:
|
|
152
|
+
filter: "published==1",
|
|
153
|
+
expand: "slides, links, videos, media_uploads, type, track, track.allowed_access_levels, location, location.venue, location.floor, speakers, moderator, sponsors, current_attendance, groups, rsvp_template, tags",
|
|
154
154
|
};
|
|
155
155
|
|
|
156
156
|
return await axios.get(endpoint,
|
|
@@ -162,12 +162,12 @@ const SSR_getVoteablePresentations = async (baseUrl, summitId, accessToken) => {
|
|
|
162
162
|
|
|
163
163
|
return [...data.data, ...remainingPages];
|
|
164
164
|
})
|
|
165
|
-
.catch(e => console.log(
|
|
165
|
+
.catch(e => console.log("ERROR: ", e));
|
|
166
166
|
};
|
|
167
167
|
|
|
168
168
|
exports.onPreBootstrap = async () => {
|
|
169
169
|
|
|
170
|
-
console.log(
|
|
170
|
+
console.log("onPreBootstrap");
|
|
171
171
|
|
|
172
172
|
const summitId = process.env.GATSBY_SUMMIT_ID;
|
|
173
173
|
const summitApiBaseUrl = process.env.GATSBY_SUMMIT_API_BASE_URL;
|
|
@@ -186,7 +186,7 @@ exports.onPreBootstrap = async () => {
|
|
|
186
186
|
tokenPath: process.env.GATSBY_OAUTH_TOKEN_PATH
|
|
187
187
|
},
|
|
188
188
|
options: {
|
|
189
|
-
authorizationMethod:
|
|
189
|
+
authorizationMethod: "header"
|
|
190
190
|
}
|
|
191
191
|
};
|
|
192
192
|
|
|
@@ -194,7 +194,7 @@ exports.onPreBootstrap = async () => {
|
|
|
194
194
|
|
|
195
195
|
// extract colors from marketing settings
|
|
196
196
|
marketingSettings.map(({ key, value }) => {
|
|
197
|
-
if (key.startsWith(
|
|
197
|
+
if (key.startsWith("color_")) colorSettings[key] = value;
|
|
198
198
|
});
|
|
199
199
|
|
|
200
200
|
// create required directories
|
|
@@ -215,16 +215,16 @@ exports.onPreBootstrap = async () => {
|
|
|
215
215
|
// summit
|
|
216
216
|
const summit = await SSR_getSummit(summitApiBaseUrl, summitId);
|
|
217
217
|
fileBuildTimes.push({
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
"file": SUMMIT_FILE_PATH,
|
|
219
|
+
"build_time": Date.now()
|
|
220
220
|
});
|
|
221
221
|
fs.writeFileSync(SUMMIT_FILE_PATH, JSON.stringify(summit), "utf8");
|
|
222
222
|
|
|
223
223
|
// Show Events
|
|
224
224
|
const allEvents = await SSR_getEvents(summitApiBaseUrl, summitId, accessToken);
|
|
225
225
|
fileBuildTimes.push({
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
"file": EVENTS_FILE_PATH,
|
|
227
|
+
"build_time": Date.now()
|
|
228
228
|
});
|
|
229
229
|
console.log(`allEvents ${allEvents.length}`);
|
|
230
230
|
|
|
@@ -234,8 +234,8 @@ exports.onPreBootstrap = async () => {
|
|
|
234
234
|
allEvents.forEach((e, index) => allEventsIDX[e.id] = index);
|
|
235
235
|
|
|
236
236
|
fileBuildTimes.push({
|
|
237
|
-
|
|
238
|
-
|
|
237
|
+
"file": EVENTS_IDX_FILE_PATH,
|
|
238
|
+
"build_time": Date.now()
|
|
239
239
|
});
|
|
240
240
|
fs.writeFileSync(EVENTS_IDX_FILE_PATH, JSON.stringify(allEventsIDX), "utf8");
|
|
241
241
|
|
|
@@ -244,8 +244,8 @@ exports.onPreBootstrap = async () => {
|
|
|
244
244
|
const allSpeakers = await SSR_getSpeakers(summitApiBaseUrl, summitId, accessToken);
|
|
245
245
|
console.log(`allSpeakers ${allSpeakers.length}`);
|
|
246
246
|
fileBuildTimes.push({
|
|
247
|
-
|
|
248
|
-
|
|
247
|
+
"file": SPEAKERS_FILE_PATH,
|
|
248
|
+
"build_time": Date.now()
|
|
249
249
|
});
|
|
250
250
|
|
|
251
251
|
fs.writeFileSync(SPEAKERS_FILE_PATH, JSON.stringify(allSpeakers), "utf8");
|
|
@@ -253,8 +253,8 @@ exports.onPreBootstrap = async () => {
|
|
|
253
253
|
const allSpeakersIDX = {};
|
|
254
254
|
allSpeakers.forEach((e, index) => allSpeakersIDX[e.id] = index);
|
|
255
255
|
fileBuildTimes.push({
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
"file": SPEAKERS_IDX_FILE_PATH,
|
|
257
|
+
"build_time": Date.now()
|
|
258
258
|
});
|
|
259
259
|
fs.writeFileSync(SPEAKERS_IDX_FILE_PATH, JSON.stringify(allSpeakersIDX), "utf8");
|
|
260
260
|
|
|
@@ -262,8 +262,8 @@ exports.onPreBootstrap = async () => {
|
|
|
262
262
|
const allVoteablePresentations = await SSR_getVoteablePresentations(summitApiBaseUrl, summitId, accessToken);
|
|
263
263
|
console.log(`allVoteablePresentations ${allVoteablePresentations.length}`);
|
|
264
264
|
fileBuildTimes.push({
|
|
265
|
-
|
|
266
|
-
|
|
265
|
+
"file":VOTEABLE_PRESENTATIONS_FILE_PATH,
|
|
266
|
+
"build_time": Date.now()
|
|
267
267
|
});
|
|
268
268
|
fs.writeFileSync(VOTEABLE_PRESENTATIONS_FILE_PATH, JSON.stringify(allVoteablePresentations), "utf8");
|
|
269
269
|
|
|
@@ -302,8 +302,8 @@ exports.createPages = ({ actions, graphql }) => {
|
|
|
302
302
|
// create a catch all redirect
|
|
303
303
|
if (maintenanceMode.enabled) {
|
|
304
304
|
createRedirect({
|
|
305
|
-
fromPath:
|
|
306
|
-
toPath:
|
|
305
|
+
fromPath: "/*",
|
|
306
|
+
toPath: "/maintenance/"
|
|
307
307
|
});
|
|
308
308
|
}
|
|
309
309
|
|
|
@@ -343,7 +343,7 @@ exports.createPages = ({ actions, graphql }) => {
|
|
|
343
343
|
|
|
344
344
|
var slug = fields.slug;
|
|
345
345
|
if (slug.match(/custom-pages/)) {
|
|
346
|
-
slug = slug.replace(
|
|
346
|
+
slug = slug.replace("/custom-pages/", "/");
|
|
347
347
|
}
|
|
348
348
|
|
|
349
349
|
const page = {
|
|
@@ -365,8 +365,34 @@ exports.createPages = ({ actions, graphql }) => {
|
|
|
365
365
|
});
|
|
366
366
|
};
|
|
367
367
|
|
|
368
|
-
exports.onCreateWebpackConfig = ({
|
|
368
|
+
exports.onCreateWebpackConfig = ({
|
|
369
|
+
actions,
|
|
370
|
+
plugins,
|
|
371
|
+
loaders,
|
|
372
|
+
getConfig
|
|
373
|
+
}) => {
|
|
374
|
+
/**
|
|
375
|
+
* Forces transpiliation of solution js files; required for theming.
|
|
376
|
+
* @see https://www.gatsbyjs.com/docs/how-to/custom-configuration/add-custom-webpack-config/#modifying-the-babel-loader
|
|
377
|
+
*/
|
|
378
|
+
const config = getConfig();
|
|
379
|
+
const jsTestString = "\\.(js|mjs|jsx|ts|tsx)$";
|
|
380
|
+
const jsTest = new RegExp(jsTestString);
|
|
381
|
+
const jsRule = config.module.rules.find(
|
|
382
|
+
(rule) => String(rule.test) === String(jsTest)
|
|
383
|
+
);
|
|
384
|
+
const solutionJsTest = new RegExp(`${__dirname}(.*)${jsTestString}`);
|
|
385
|
+
const jsRuleInclude = jsRule.include;
|
|
386
|
+
jsRule.include = (modulePath) => {
|
|
387
|
+
if (solutionJsTest.test(modulePath)) return true;
|
|
388
|
+
return jsRuleInclude(modulePath);
|
|
389
|
+
}
|
|
369
390
|
actions.setWebpackConfig({
|
|
391
|
+
module: {
|
|
392
|
+
rules: [
|
|
393
|
+
jsRule
|
|
394
|
+
]
|
|
395
|
+
},
|
|
370
396
|
resolve: {
|
|
371
397
|
/**
|
|
372
398
|
* Webpack removed automatic polyfills for these node APIs in v5,
|
|
@@ -375,79 +401,82 @@ exports.onCreateWebpackConfig = ({ actions, plugins, loaders }) => {
|
|
|
375
401
|
* @see https://viglucci.io/how-to-polyfill-buffer-with-webpack-5
|
|
376
402
|
*/
|
|
377
403
|
fallback: {
|
|
378
|
-
path: require.resolve(
|
|
379
|
-
stream: require.resolve(
|
|
380
|
-
buffer: require.resolve(
|
|
404
|
+
path: require.resolve("path-browserify"),
|
|
405
|
+
stream: require.resolve("stream-browserify"),
|
|
406
|
+
buffer: require.resolve("buffer/")
|
|
381
407
|
},
|
|
382
408
|
// allows content and data imports to correctly resolve when theming
|
|
383
409
|
modules: [path.resolve(__dirname, "src")]
|
|
384
410
|
},
|
|
385
|
-
//
|
|
386
|
-
externals: ['canvas'],
|
|
387
|
-
// devtool: 'source-map',
|
|
411
|
+
// devtool: "source-map",
|
|
388
412
|
plugins: [
|
|
389
413
|
plugins.define({
|
|
390
|
-
|
|
391
|
-
|
|
414
|
+
"global.GENTLY": false,
|
|
415
|
+
"global.BLOB": false
|
|
392
416
|
}),
|
|
393
417
|
new webpack.ProvidePlugin({
|
|
394
|
-
Buffer: [
|
|
418
|
+
Buffer: ["buffer", "Buffer"],
|
|
419
|
+
}),
|
|
420
|
+
// ignore unused jsdom dependency
|
|
421
|
+
new webpack.IgnorePlugin({
|
|
422
|
+
resourceRegExp: /canvas/,
|
|
423
|
+
contextRegExp: /jsdom$/
|
|
395
424
|
}),
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
425
|
+
// upload source maps only if we have an sentry auth token and we are at production
|
|
426
|
+
...("GATSBY_SENTRY_AUTH_TOKEN" in process.env && process.env.NODE_ENV === "production") ?[
|
|
427
|
+
new SentryWebpackPlugin({
|
|
428
|
+
org: process.env.GATSBY_SENTRY_ORG,
|
|
429
|
+
project: process.env.GATSBY_SENTRY_PROJECT,
|
|
430
|
+
ignore: ["app-*", "polyfill-*", "framework-*", "webpack-runtime-*", "~partytown"],
|
|
431
|
+
// Specify the directory containing build artifacts
|
|
432
|
+
include: [
|
|
433
|
+
{
|
|
434
|
+
paths: ["src","public",".cache"],
|
|
435
|
+
urlPrefix: "~/",
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
paths: ["node_modules/upcoming-events-widget/dist"],
|
|
439
|
+
urlPrefix: "~/node_modules/upcoming-events-widget/dist",
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
paths: ["node_modules/summit-registration-lite/dist"],
|
|
443
|
+
urlPrefix: "~/node_modules/summit-registration-lite/dist",
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
paths: ["node_modules/full-schedule-widget/dist"],
|
|
447
|
+
urlPrefix: "~/node_modules/full-schedule-widget//dist",
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
paths: ["node_modules/schedule-filter-widget/dist"],
|
|
451
|
+
urlPrefix: "~/node_modules/schedule-filter-widget/dist",
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
paths: ["node_modules/lite-schedule-widget/dist"],
|
|
455
|
+
urlPrefix: "~/node_modules/lite-schedule-widget/dist",
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
paths: ["node_modules/live-event-widget/dist"],
|
|
459
|
+
urlPrefix: "~/node_modules/live-event-widget/dist",
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
paths: ["node_modules/attendee-to-attendee-widget/dist"],
|
|
463
|
+
urlPrefix: "~/node_modules/attendee-to-attendee-widget/dist",
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
paths: ["node_modules/openstack-uicore-foundation/lib"],
|
|
467
|
+
urlPrefix: "~/node_modules/openstack-uicore-foundation/lib",
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
paths: ["node_modules/speakers-widget/dist"],
|
|
471
|
+
urlPrefix: "~/node_modules/speakers-widget/dist",
|
|
472
|
+
},
|
|
473
|
+
],
|
|
474
|
+
// Auth tokens can be obtained from https://sentry.io/settings/account/api/auth-tokens/
|
|
475
|
+
// and needs the `project:releases` and `org:read` scopes
|
|
476
|
+
authToken: process.env.GATSBY_SENTRY_AUTH_TOKEN,
|
|
477
|
+
// Optionally uncomment the line below to override automatic release name detection
|
|
478
|
+
release: process.env.GATSBY_SENTRY_RELEASE,
|
|
479
|
+
})]:[],
|
|
451
480
|
]
|
|
452
481
|
});
|
|
453
482
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openeventkit/event-site",
|
|
3
3
|
"description": "Event Site",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.10",
|
|
5
5
|
"author": "Tipit LLC",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@mui/base": "^5.0.0-alpha.114",
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
"browser-tabs-lock": "^1.2.15",
|
|
28
28
|
"buffer": "^6.0.3",
|
|
29
29
|
"bulma": "^0.9.0",
|
|
30
|
-
"canvas": "^2.6.1",
|
|
31
30
|
"classnames": "^2.3.1",
|
|
32
31
|
"clean-html": "^1.5.0",
|
|
33
32
|
"codemirror": "^5.55.0",
|
|
@@ -42,7 +41,7 @@
|
|
|
42
41
|
"font-awesome": "^4.7.0",
|
|
43
42
|
"formik": "^2.2.9",
|
|
44
43
|
"fs-extra": "^9.0.1",
|
|
45
|
-
"full-schedule-widget": "2.0.
|
|
44
|
+
"full-schedule-widget": "2.0.26",
|
|
46
45
|
"gatsby": "^5.8.1",
|
|
47
46
|
"gatsby-alias-imports": "^1.0.6",
|
|
48
47
|
"gatsby-plugin-image": "^3.8.0",
|
package/src/components/Layout.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useState } from "react";
|
|
2
2
|
import { connect } from "react-redux";
|
|
3
|
-
import
|
|
3
|
+
import Navbar from "../components/Navbar";
|
|
4
4
|
import ClockComponent from "../components/ClockComponent";
|
|
5
5
|
import Footer from "../components/Footer";
|
|
6
6
|
|
|
@@ -27,7 +27,7 @@ const TemplateWrapper = ({
|
|
|
27
27
|
return (
|
|
28
28
|
<div id="container">
|
|
29
29
|
<a className="sr-only skip-to-content" href="#content-wrapper">Skip to content</a>
|
|
30
|
-
<
|
|
30
|
+
<Navbar location={location} />
|
|
31
31
|
<ClockComponent active={isFocus} summit={summit} />
|
|
32
32
|
<main id="content-wrapper">{children}</main>
|
|
33
33
|
<Footer marketing={marketing} />
|
|
@@ -23,6 +23,7 @@ const LoginButton = ({
|
|
|
23
23
|
allowsNativeAuth,
|
|
24
24
|
allowsOtpAuth,
|
|
25
25
|
location,
|
|
26
|
+
children,
|
|
26
27
|
}) => {
|
|
27
28
|
const [isActive, setIsActive] = useState(false);
|
|
28
29
|
const [initialEmailValue, setInitialEmailValue] = useState('');
|
|
@@ -58,13 +59,13 @@ const LoginButton = ({
|
|
|
58
59
|
doLogin(getBackURL(), provider, null, initialEmailValue || null);
|
|
59
60
|
};
|
|
60
61
|
|
|
61
|
-
const
|
|
62
|
+
const handleClosePopup = () => {
|
|
62
63
|
setIsActive(false);
|
|
63
64
|
setOtpLogin(false);
|
|
64
65
|
setOtpError(false);
|
|
65
66
|
}
|
|
66
67
|
|
|
67
|
-
const
|
|
68
|
+
const handleOpenPopup = () => {
|
|
68
69
|
setIsActive(true);
|
|
69
70
|
setOtpLogin(false);
|
|
70
71
|
setOtpError(false);
|
|
@@ -130,10 +131,14 @@ const LoginButton = ({
|
|
|
130
131
|
|
|
131
132
|
return (
|
|
132
133
|
<div className={styles.loginButtonWrapper}>
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
{children ?
|
|
135
|
+
React.cloneElement(children, { onClick: handleOpenPopup })
|
|
136
|
+
:
|
|
137
|
+
<button className={`${styles.button} button is-large`} onClick={handleOpenPopup}>
|
|
138
|
+
<i className={`fa fa-2x fa-edit icon is-large`} />
|
|
139
|
+
<b>{loginButton.text}</b>
|
|
140
|
+
</button>
|
|
141
|
+
}
|
|
137
142
|
{isActive &&
|
|
138
143
|
<div id={`${styles.modal}`} className="modal is-active">
|
|
139
144
|
<div className="modal-background"></div>
|
|
@@ -142,7 +147,7 @@ const LoginButton = ({
|
|
|
142
147
|
<div className={styles.innerWrapper}>
|
|
143
148
|
<div className={styles.title}>
|
|
144
149
|
<span>{summit.name}</span>
|
|
145
|
-
<i className="fa fa-close" aria-label="close" onClick={
|
|
150
|
+
<i className="fa fa-close" aria-label="close" onClick={handleClosePopup}></i>
|
|
146
151
|
</div>
|
|
147
152
|
{!otpLogin && <LoginComponent {...loginComponentProps} />}
|
|
148
153
|
{otpLogin && <PasswordlessLoginComponent {...passwordlessLoginProps} />}
|
|
@@ -26,8 +26,7 @@ const Navbar = ({
|
|
|
26
26
|
userProfile,
|
|
27
27
|
updateProfile,
|
|
28
28
|
updateProfilePicture,
|
|
29
|
-
eventRedirect
|
|
30
|
-
logo
|
|
29
|
+
eventRedirect
|
|
31
30
|
}) => {
|
|
32
31
|
|
|
33
32
|
// we store this calculation to use it later
|
|
@@ -110,7 +109,6 @@ const Navbar = ({
|
|
|
110
109
|
<NavbarTemplate
|
|
111
110
|
data={navbarContent.items.filter(showItem)}
|
|
112
111
|
summit={summit}
|
|
113
|
-
summitPhase={summitPhase}
|
|
114
112
|
isLoggedUser={isLoggedUser}
|
|
115
113
|
idpLoading={idpLoading}
|
|
116
114
|
idpProfile={idpProfile}
|
|
@@ -118,7 +116,7 @@ const Navbar = ({
|
|
|
118
116
|
updateProfile={updateProfile}
|
|
119
117
|
updateProfilePicture={updateProfilePicture}
|
|
120
118
|
defaultPath={defaultPath}
|
|
121
|
-
logo={logo}
|
|
119
|
+
logo={summit?.logo}
|
|
122
120
|
/>
|
|
123
121
|
)
|
|
124
122
|
};
|
|
@@ -128,10 +126,14 @@ const mapStateToProps = ({
|
|
|
128
126
|
clockState,
|
|
129
127
|
settingState,
|
|
130
128
|
summitState,
|
|
129
|
+
loggedUserState,
|
|
131
130
|
userState
|
|
132
131
|
}) => ({
|
|
133
132
|
summitPhase: clockState.summit_phase,
|
|
134
133
|
summit: summitState.summit,
|
|
134
|
+
isLoggedUser: loggedUserState.isLoggedUser,
|
|
135
|
+
idpProfile: userState.idpProfile,
|
|
136
|
+
idpLoading: userState.loadingIDP,
|
|
135
137
|
userProfile: userState.userProfile,
|
|
136
138
|
// TODO: move to site settings i/o marketing page settings
|
|
137
139
|
eventRedirect: settingState.marketingPageSettings.eventRedirect
|
|
@@ -42,7 +42,8 @@ const RegistrationLiteComponent = ({
|
|
|
42
42
|
allowsNativeAuth,
|
|
43
43
|
allowsOtpAuth,
|
|
44
44
|
checkRequireExtraQuestionsByAttendee,
|
|
45
|
-
getExtraQuestions
|
|
45
|
+
getExtraQuestions,
|
|
46
|
+
children,
|
|
46
47
|
}) => {
|
|
47
48
|
const [isActive, setIsActive] = useState(false);
|
|
48
49
|
const [initialEmailValue, setInitialEmailValue] = useState('');
|
|
@@ -64,6 +65,10 @@ const RegistrationLiteComponent = ({
|
|
|
64
65
|
return URI.encode(backUrl);
|
|
65
66
|
};
|
|
66
67
|
|
|
68
|
+
const handleOpenPopup = () => {
|
|
69
|
+
setIsActive(true);
|
|
70
|
+
}
|
|
71
|
+
|
|
67
72
|
const onClickLogin = (provider) => {
|
|
68
73
|
doLogin(getBackURL(), provider);
|
|
69
74
|
};
|
|
@@ -125,8 +130,7 @@ const RegistrationLiteComponent = ({
|
|
|
125
130
|
getAccessToken: getAccessToken,
|
|
126
131
|
closeWidget: () => {
|
|
127
132
|
// reload user profile
|
|
128
|
-
|
|
129
|
-
getUserProfile();
|
|
133
|
+
getUserProfile().catch((e) => console.log("getUserProfile error. Not logged in?"));
|
|
130
134
|
setIsActive(false);
|
|
131
135
|
},
|
|
132
136
|
goToExtraQuestions: () => {
|
|
@@ -174,18 +178,19 @@ const RegistrationLiteComponent = ({
|
|
|
174
178
|
|
|
175
179
|
return (
|
|
176
180
|
<>
|
|
177
|
-
{
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
<
|
|
182
|
-
|
|
181
|
+
{children ?
|
|
182
|
+
React.cloneElement(children, { onClick: handleOpenPopup })
|
|
183
|
+
:
|
|
184
|
+
registerButton.display &&
|
|
185
|
+
<button className={`${styles.button} button is-large`} disabled={isActive}
|
|
186
|
+
onClick={handleOpenPopup}>
|
|
187
|
+
<i className={`fa fa-2x fa-edit icon is-large`}/>
|
|
188
|
+
<b>{registerButton.text}</b>
|
|
189
|
+
</button>
|
|
183
190
|
}
|
|
184
|
-
<
|
|
185
|
-
<
|
|
186
|
-
|
|
187
|
-
</Sentry.ErrorBoundary>
|
|
188
|
-
</div>
|
|
191
|
+
<Sentry.ErrorBoundary fallback={SentryFallbackFunction({componentName: 'Registration Lite'})}>
|
|
192
|
+
{isActive && <RegistrationLiteWidget {...widgetProps} />}
|
|
193
|
+
</Sentry.ErrorBoundary>
|
|
189
194
|
</>
|
|
190
195
|
)
|
|
191
196
|
};
|