Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

[PROD] Patch 1.7.0.1 #270

Merged
merged 5 commits into from
May 25, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: issue #112
  • Loading branch information
yoution committed May 17, 2021
commit 17ffacdd5b26798b39111be62179fbfe501ae9ad
8 changes: 4 additions & 4 deletions src/constants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,10 @@ export const ACTION_TYPE = {
AUTH_LOAD_TEAM_MEMBERS_ERROR: "AUTH_LOAD_TEAM_MEMBERS_ERROR",
AUTH_CLEAR_TEAM_MEMBERS: "AUTH_CLEAR_TEAM_MEMBERS",

AUTH_LOAD_USER_PROFILE: "AUTH_LOAD_USER_PROFILE",
AUTH_LOAD_USER_PROFILE_PENDING: "AUTH_LOAD_USER_PROFILE_PENDING",
AUTH_LOAD_USER_PROFILE_SUCCESS: "AUTH_LOAD_USER_PROFILE_SUCCESS",
AUTH_LOAD_USER_PROFILE_ERROR: "AUTH_LOAD_USER_PROFILE_ERROR",
AUTH_LOAD_V5_USER_PROFILE: "AUTH_LOAD_V5_USER_PROFILE",
AUTH_LOAD_V5_USER_PROFILE_PENDING: "AUTH_LOAD_V5_USER_PROFILE_PENDING",
AUTH_LOAD_V5_USER_PROFILE_SUCCESS: "AUTH_LOAD_V5_USER_PROFILE_SUCCESS",
AUTH_LOAD_V5_USER_PROFILE_ERROR: "AUTH_LOAD_V5_USER_PROFILE_ERROR",

/*
Email Popup
Expand Down
4 changes: 2 additions & 2 deletions src/hoc/withAuthentication/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export const authLoadTeamMembers = (teamId) => ({
*
* @returns {Promise} loaded user profile
*/
export const authLoadUserProfile = (teamId) => ({
type: ACTION_TYPE.AUTH_LOAD_USER_PROFILE,
export const authLoadUserProfile = () => ({
type: ACTION_TYPE.AUTH_LOAD_V5_USER_PROFILE,
payload: async () => {
const res = await getUserProfile();
return res.data;
Expand Down
2 changes: 1 addition & 1 deletion src/hoc/withAuthentication/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default function withAuthentication(Component) {

{/* Show component only if v5 user profile load error */}
{isLoggedIn === true && v5UserProfileLoadingError && (
<LoadingIndicator error={"Error: Network Error"} />
<LoadingIndicator error={v5UserProfileLoadingError} />
)}
{/* Show component only if user is logged-in and if we don't need team members or we already loaded them */}
{isLoggedIn === true &&
Expand Down
4 changes: 2 additions & 2 deletions src/hoc/withAuthentication/reducers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ const reducer = (state = initialState, action) => {
};
}

case ACTION_TYPE.AUTH_LOAD_USER_PROFILE_SUCCESS: {
case ACTION_TYPE.AUTH_LOAD_V5_USER_PROFILE_SUCCESS: {
return {
...state,
v5UserProfile: action.payload,
v5UserProfileLoadingError: false,
};
}
case ACTION_TYPE.AUTH_LOAD_USER_PROFILE_ERROR: {
case ACTION_TYPE.AUTH_LOAD_V5_USER_PROFILE_ERROR: {
return {
...state,
v5UserProfileLoadingError: action.payload,
Expand Down