@openeventkit/event-site 2.0.11 → 2.0.13

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openeventkit/event-site",
3
3
  "description": "Event Site",
4
- "version": "2.0.11",
4
+ "version": "2.0.13",
5
5
  "author": "Tipit LLC",
6
6
  "dependencies": {
7
7
  "@mui/base": "^5.0.0-alpha.114",
@@ -75,7 +75,7 @@
75
75
  "netlify-cms-app": "^2.15.72",
76
76
  "netlify-cms-lib-widgets": "^1.8.0",
77
77
  "node-sass-utils": "^1.1.3",
78
- "openstack-uicore-foundation": "^4.1.39",
78
+ "openstack-uicore-foundation": "^4.1.40",
79
79
  "path-browserify": "^1.0.1",
80
80
  "prop-types": "^15.6.0",
81
81
  "react": "^18.2.0",
@@ -199,7 +199,7 @@ const AccessTracker = ({ user, isLoggedUser, summitPhase }) => {
199
199
  return user.isAuthorized;
200
200
  };
201
201
 
202
- // if summit_phase wasn't initialized yet (eg: due to a delay in the reducer),
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
 
@@ -50,7 +50,8 @@ const AuthComponent = ({
50
50
 
51
51
  useEffect(() => {
52
52
  const fragmentParser = new FragmentParser();
53
- setIsActive(fragmentParser.getParam('login'));
53
+ // to show the login dialog check if we are already logged or not
54
+ setIsActive(fragmentParser.getParam('login') && !isLoggedUser);
54
55
  const paramInitialEmailValue = fragmentParser.getParam('email');
55
56
  if (paramInitialEmailValue)
56
57
  setInitialEmailValue(paramInitialEmailValue);
@@ -104,7 +105,6 @@ const AuthComponent = ({
104
105
  };
105
106
 
106
107
  const loginPasswordless = (code, email) => {
107
-
108
108
  const params = {
109
109
  connection: "email",
110
110
  otp: code,
@@ -141,7 +141,12 @@ const AuthComponent = ({
141
141
  const passwordlessLoginProps = {
142
142
  email: userEmail,
143
143
  codeLength: otpLength,
144
- passwordlessLogin: (code) => loginPasswordless(code, userEmail).then(() => navigate(getBackURL(false))).catch((e) => console.log(e)),
144
+ passwordlessLogin: (code) => loginPasswordless(code, userEmail).then(() => {
145
+ // close popup and then navigate bc its its the same origin page
146
+ // it would not reload and closed the popup automatically
147
+ handleClosePopup();
148
+ navigate(getBackURL(false))
149
+ }).catch((e) => console.log(e)),
145
150
  codeError: otpError,
146
151
  goToLogin: () => setOtpLogin(false),
147
152
  getLoginCode: (email) => sendCode(email),
@@ -11,7 +11,7 @@ import moment from "moment-timezone";
11
11
  *
12
12
  * @param children
13
13
  * @param isAuthorized
14
- * @param summit_phase
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
- summit_phase,
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 && summit_phase === PHASES.DURING){
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
- },[summit_phase, hasTicket, userProfile, doVirtualCheckIn]);
40
+ },[summitPhase, hasTicket, userProfile, doVirtualCheckIn]);
41
41
 
42
42
  const userCanByPassAuthz = () => {
43
43
  return isAuthorized;
44
44
  };
45
45
 
46
- // if summit_phase wasn't initialized yet (eg: due to a delay in the reducer),
46
+ // if summitPhase wasn't initialized yet (eg: due to a delay in the reducer),
47
47
  // this render shouldn't continue
48
- if (summit_phase === null) return null;
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() && summit_phase === PHASES.BEFORE) {
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
 
@@ -422,7 +422,6 @@ div.event-feedback-container {
422
422
  max-height: 1500px;
423
423
 
424
424
  .disqus-header {
425
- background-color: #fff;
426
425
  border-bottom: 1px solid #eee;
427
426
  padding: 0 15px;
428
427
  position: relative;