@openeventkit/event-site 2.1.11 → 2.2.12-beta.2

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-node.js CHANGED
@@ -1,6 +1,6 @@
1
1
  const axios = require("axios");
2
2
  const path = require("path");
3
- const fs = require("fs");
3
+ const fs = require("fs-extra");
4
4
  const webpack = require("webpack");
5
5
  const {
6
6
  createFilePath
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openeventkit/event-site",
3
3
  "description": "Event Site",
4
- "version": "2.1.11",
4
+ "version": "2.2.12-beta.2",
5
5
  "author": "Tipit LLC",
6
6
  "dependencies": {
7
7
  "@emotion/server": "^11.11.0",
@@ -55,7 +55,8 @@
55
55
  "final-form": "4.20.7",
56
56
  "font-awesome": "^4.7.0",
57
57
  "formik": "^2.4.6",
58
- "full-schedule-widget": "3.0.9",
58
+ "fs-extra": "^11.3.0",
59
+ "full-schedule-widget": "3.0.10",
59
60
  "gatsby": "^5.13.5",
60
61
  "gatsby-alias-imports": "^1.0.6",
61
62
  "gatsby-plugin-decap-cms": "^4.0.4",
@@ -87,7 +88,7 @@
87
88
  "markdown-it": "^12.0.0",
88
89
  "moment": "^2.27.0",
89
90
  "moment-timezone": "^0.5.31",
90
- "my-orders-tickets-widget": "1.0.0-beta.56",
91
+ "my-orders-tickets-widget": "1.0.0-beta.59",
91
92
  "object.assign": "^4.1.5",
92
93
  "openstack-uicore-foundation": "4.2.8",
93
94
  "path-browserify": "^1.0.1",
@@ -135,7 +136,7 @@
135
136
  "stream-browserify": "^3.0.0",
136
137
  "stream-chat": "^2.7.2",
137
138
  "stream-chat-react": "3.1.7",
138
- "summit-registration-lite": "6.0.2",
139
+ "summit-registration-lite": "6.0.3",
139
140
  "superagent": "8.0.9",
140
141
  "sweetalert2": "^11.11.1",
141
142
  "upcoming-events-widget": "3.0.7",
@@ -414,7 +414,7 @@ export const updatePassword = (password) => async (dispatch) => {
414
414
  access_token: accessToken,
415
415
  };
416
416
 
417
- putRequest(
417
+ return putRequest(
418
418
  createAction(START_LOADING_IDP_PROFILE),
419
419
  createAction(UPDATE_PASSWORD),
420
420
  `${window.IDP_BASE_URL}/api/v1/users/me`,
@@ -1,8 +1,8 @@
1
- import React, { useState, useEffect } from "react";
1
+ import React, {useEffect, useState} from "react";
2
2
 
3
3
  import styles from "../styles/change-password.module.scss";
4
4
 
5
- const ChangePasswordComponent = ({ updatePassword }) => {
5
+ const ChangePasswordComponent = ({updatePassword}) => {
6
6
  const [currentPassword, setCurrentPassword] = useState("");
7
7
  const [displayCurrentPassword, setDisplayCurrentPassword] = useState(false);
8
8
  const [newPassword, setNewPassword] = useState("");
@@ -14,14 +14,27 @@ const ChangePasswordComponent = ({ updatePassword }) => {
14
14
 
15
15
  useEffect(() => {
16
16
  return () => {
17
- setCurrentPassword("");
18
- setNewPassword("");
19
- setChangePassword(false);
20
- setDisplayCurrentPassword(false);
21
- setDisplayNewPassword(false);
17
+ resetFields();
22
18
  };
23
19
  }, []);
24
20
 
21
+ const resetFields = () => {
22
+ setCurrentPassword("");
23
+ setNewPassword("");
24
+ setNewPasswordConfirm("");
25
+ setChangePassword(false);
26
+ setDisplayCurrentPassword(false);
27
+ setDisplayNewPassword(false);
28
+ setDisplayNewPasswordConfirm(false);
29
+ }
30
+
31
+ const handleUpdatePassword = (e) => {
32
+ updatePassword(currentPassword, newPassword, newPasswordConfirm)
33
+ .finally(() => {
34
+ resetFields();
35
+ })
36
+ }
37
+
25
38
  return (
26
39
  <div className={styles.changePassowordContainer}>
27
40
  <div className={styles.title}>
@@ -45,7 +58,7 @@ const ChangePasswordComponent = ({ updatePassword }) => {
45
58
  value={currentPassword}
46
59
  />
47
60
  <button className="link" onClick={() => setDisplayCurrentPassword(!displayCurrentPassword)}>
48
- <i className={`fa fa-2x ${displayCurrentPassword ? "fa-eye-slash" : "fa-eye"} icon is-large`} />
61
+ <i className={`fa fa-2x ${displayCurrentPassword ? "fa-eye-slash" : "fa-eye"} icon is-large`}/>
49
62
  </button>
50
63
  </div>
51
64
  </div>
@@ -60,7 +73,7 @@ const ChangePasswordComponent = ({ updatePassword }) => {
60
73
  value={newPassword}
61
74
  />
62
75
  <button className="link" onClick={() => setDisplayNewPassword(!displayNewPassword)}>
63
- <i className={`fa fa-2x ${displayNewPassword ? "fa-eye-slash" : "fa-eye"} icon is-large`} />
76
+ <i className={`fa fa-2x ${displayNewPassword ? "fa-eye-slash" : "fa-eye"} icon is-large`}/>
64
77
  </button>
65
78
  </div>
66
79
  </div>
@@ -75,7 +88,7 @@ const ChangePasswordComponent = ({ updatePassword }) => {
75
88
  value={newPasswordConfirm}
76
89
  />
77
90
  <button className="link" onClick={() => setDisplayNewPasswordConfirm(!displayNewPasswordConfirm)}>
78
- <i className={`fa fa-2x ${displayNewPasswordConfirm ? "fa-eye-slash" : "fa-eye"} icon is-large`} />
91
+ <i className={`fa fa-2x ${displayNewPasswordConfirm ? "fa-eye-slash" : "fa-eye"} icon is-large`}/>
79
92
  </button>
80
93
  </div>
81
94
  </div>
@@ -83,8 +96,8 @@ const ChangePasswordComponent = ({ updatePassword }) => {
83
96
  <div className={`columns is-mobile ${styles.buttons}`}>
84
97
  <div className={`column is-full`}>
85
98
  <button disabled={!newPassword || !newPasswordConfirm}
86
- className="button is-large"
87
- onClick={() => updatePassword(currentPassword, newPassword, newPasswordConfirm)}
99
+ className="button is-large"
100
+ onClick={handleUpdatePassword}
88
101
  >
89
102
  Update
90
103
  </button>
@@ -173,7 +173,7 @@ export const FullProfilePageTemplate = ({ user, getIDPProfile, updateProfile, up
173
173
  password,
174
174
  password_confirmation
175
175
  };
176
- updatePassword(passwordObject);
176
+ return updatePassword(passwordObject);
177
177
  };
178
178
 
179
179
  const handleTogglePopup = (profile) => {
@@ -40,7 +40,11 @@ const withRealTimeUpdates = WrappedComponent => {
40
40
  this._checkForPastNoveltiesDebounced = _.debounce(this.checkForPastNovelties, CHECK_FOR_NOVELTIES_DELAY);
41
41
 
42
42
  try {
43
- this._supabase = SupabaseClientBuilder.getClient(getEnvVariable(SUPABASE_URL), getEnvVariable(SUPABASE_KEY));
43
+ const supabaseUrl = getEnvVariable(SUPABASE_URL);
44
+ const supabaseKey = getEnvVariable(SUPABASE_KEY);
45
+ if(supabaseUrl && supabaseKey){
46
+ this._supabase = SupabaseClientBuilder.getClient(supabaseUrl, supabaseKey);
47
+ }
44
48
  } catch (e) {
45
49
  this._supabase = null;
46
50
  console.log(e);