Lint/format
This commit is contained in:
parent
4dcabd67a7
commit
449398b88f
2 changed files with 36 additions and 36 deletions
|
@ -32,7 +32,7 @@ const defaultState = {
|
||||||
referrerSetError: '',
|
referrerSetError: '',
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.AUTHENTICATION_STARTED] = state =>
|
reducers[ACTIONS.AUTHENTICATION_STARTED] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
authenticationIsPending: true,
|
authenticationIsPending: true,
|
||||||
userIsPending: true,
|
userIsPending: true,
|
||||||
|
@ -47,14 +47,14 @@ reducers[ACTIONS.AUTHENTICATION_SUCCESS] = (state, action) =>
|
||||||
user: action.data.user,
|
user: action.data.user,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.AUTHENTICATION_FAILURE] = state =>
|
reducers[ACTIONS.AUTHENTICATION_FAILURE] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
authenticationIsPending: false,
|
authenticationIsPending: false,
|
||||||
userIsPending: false,
|
userIsPending: false,
|
||||||
user: null,
|
user: null,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_FETCH_STARTED] = state =>
|
reducers[ACTIONS.USER_FETCH_STARTED] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
userIsPending: true,
|
userIsPending: true,
|
||||||
});
|
});
|
||||||
|
@ -66,7 +66,7 @@ reducers[ACTIONS.USER_FETCH_SUCCESS] = (state, action) =>
|
||||||
emailToVerify: action.data.user.has_verified_email ? null : state.emailToVerify,
|
emailToVerify: action.data.user.has_verified_email ? null : state.emailToVerify,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_FETCH_FAILURE] = state =>
|
reducers[ACTIONS.USER_FETCH_FAILURE] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
userIsPending: true,
|
userIsPending: true,
|
||||||
user: null,
|
user: null,
|
||||||
|
@ -88,7 +88,7 @@ reducers[ACTIONS.USER_PHONE_NEW_SUCCESS] = (state, action) =>
|
||||||
phoneNewIsPending: false,
|
phoneNewIsPending: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_PHONE_RESET] = state =>
|
reducers[ACTIONS.USER_PHONE_RESET] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
phoneToVerify: null,
|
phoneToVerify: null,
|
||||||
});
|
});
|
||||||
|
@ -99,7 +99,7 @@ reducers[ACTIONS.USER_PHONE_NEW_FAILURE] = (state, action) =>
|
||||||
phoneNewErrorMessage: action.data.error,
|
phoneNewErrorMessage: action.data.error,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_PHONE_VERIFY_STARTED] = state =>
|
reducers[ACTIONS.USER_PHONE_VERIFY_STARTED] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
phoneVerifyIsPending: true,
|
phoneVerifyIsPending: true,
|
||||||
phoneVerifyErrorMessage: '',
|
phoneVerifyErrorMessage: '',
|
||||||
|
@ -118,7 +118,7 @@ reducers[ACTIONS.USER_PHONE_VERIFY_FAILURE] = (state, action) =>
|
||||||
phoneVerifyErrorMessage: action.data.error,
|
phoneVerifyErrorMessage: action.data.error,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_EMAIL_NEW_STARTED] = state =>
|
reducers[ACTIONS.USER_EMAIL_NEW_STARTED] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
emailNewIsPending: true,
|
emailNewIsPending: true,
|
||||||
emailNewErrorMessage: '',
|
emailNewErrorMessage: '',
|
||||||
|
@ -136,12 +136,12 @@ reducers[ACTIONS.USER_EMAIL_NEW_SUCCESS] = (state, action) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.USER_EMAIL_NEW_EXISTS] = state =>
|
reducers[ACTIONS.USER_EMAIL_NEW_EXISTS] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
emailAlreadyExists: true,
|
emailAlreadyExists: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_EMAIL_NEW_DOES_NOT_EXIST] = state =>
|
reducers[ACTIONS.USER_EMAIL_NEW_DOES_NOT_EXIST] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
emailDoesNotExist: true,
|
emailDoesNotExist: true,
|
||||||
});
|
});
|
||||||
|
@ -152,7 +152,7 @@ reducers[ACTIONS.USER_EMAIL_NEW_FAILURE] = (state, action) =>
|
||||||
emailNewErrorMessage: action.data.error,
|
emailNewErrorMessage: action.data.error,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_EMAIL_NEW_CLEAR_ENTRY] = state => {
|
reducers[ACTIONS.USER_EMAIL_NEW_CLEAR_ENTRY] = (state) => {
|
||||||
const newUser = { ...state.user };
|
const newUser = { ...state.user };
|
||||||
delete newUser.primary_email;
|
delete newUser.primary_email;
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ reducers[ACTIONS.USER_EMAIL_NEW_CLEAR_ENTRY] = state => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.USER_PASSWORD_SET_CLEAR] = state =>
|
reducers[ACTIONS.USER_PASSWORD_SET_CLEAR] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
passwordResetSuccess: false,
|
passwordResetSuccess: false,
|
||||||
passwordResetPending: false,
|
passwordResetPending: false,
|
||||||
|
@ -175,7 +175,7 @@ reducers[ACTIONS.USER_PASSWORD_SET_CLEAR] = state =>
|
||||||
passwordSetSuccess: false,
|
passwordSetSuccess: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_EMAIL_VERIFY_STARTED] = state =>
|
reducers[ACTIONS.USER_EMAIL_VERIFY_STARTED] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
emailVerifyIsPending: true,
|
emailVerifyIsPending: true,
|
||||||
emailVerifyErrorMessage: '',
|
emailVerifyErrorMessage: '',
|
||||||
|
@ -202,7 +202,7 @@ reducers[ACTIONS.USER_EMAIL_VERIFY_SET] = (state, action) =>
|
||||||
emailToVerify: action.data.email,
|
emailToVerify: action.data.email,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_IDENTITY_VERIFY_STARTED] = state =>
|
reducers[ACTIONS.USER_IDENTITY_VERIFY_STARTED] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
identityVerifyIsPending: true,
|
identityVerifyIsPending: true,
|
||||||
identityVerifyErrorMessage: '',
|
identityVerifyErrorMessage: '',
|
||||||
|
@ -229,7 +229,7 @@ reducers[ACTIONS.FETCH_ACCESS_TOKEN_SUCCESS] = (state, action) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.USER_INVITE_STATUS_FETCH_STARTED] = state =>
|
reducers[ACTIONS.USER_INVITE_STATUS_FETCH_STARTED] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
inviteStatusIsPending: true,
|
inviteStatusIsPending: true,
|
||||||
});
|
});
|
||||||
|
@ -243,13 +243,13 @@ reducers[ACTIONS.USER_INVITE_STATUS_FETCH_SUCCESS] = (state, action) =>
|
||||||
referralCode: action.data.referralCode,
|
referralCode: action.data.referralCode,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_INVITE_NEW_STARTED] = state =>
|
reducers[ACTIONS.USER_INVITE_NEW_STARTED] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
inviteNewIsPending: true,
|
inviteNewIsPending: true,
|
||||||
inviteNewErrorMessage: '',
|
inviteNewErrorMessage: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_INVITE_NEW_SUCCESS] = state =>
|
reducers[ACTIONS.USER_INVITE_NEW_SUCCESS] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
inviteNewIsPending: false,
|
inviteNewIsPending: false,
|
||||||
inviteNewErrorMessage: '',
|
inviteNewErrorMessage: '',
|
||||||
|
@ -261,14 +261,14 @@ reducers[ACTIONS.USER_INVITE_NEW_FAILURE] = (state, action) =>
|
||||||
inviteNewErrorMessage: action.data.error.message,
|
inviteNewErrorMessage: action.data.error.message,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_INVITE_STATUS_FETCH_FAILURE] = state =>
|
reducers[ACTIONS.USER_INVITE_STATUS_FETCH_FAILURE] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
inviteStatusIsPending: false,
|
inviteStatusIsPending: false,
|
||||||
invitesRemaining: null,
|
invitesRemaining: null,
|
||||||
invitees: null,
|
invitees: null,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_YOUTUBE_IMPORT_STARTED] = state =>
|
reducers[ACTIONS.USER_YOUTUBE_IMPORT_STARTED] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
youtubeChannelImportPending: true,
|
youtubeChannelImportPending: true,
|
||||||
youtubeChannelImportErrorMessage: '',
|
youtubeChannelImportErrorMessage: '',
|
||||||
|
@ -293,28 +293,28 @@ reducers[ACTIONS.USER_YOUTUBE_IMPORT_FAILURE] = (state, action) =>
|
||||||
youtubeChannelImportErrorMessage: action.data,
|
youtubeChannelImportErrorMessage: action.data,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_EMAIL_VERIFY_RETRY_STARTED] = state =>
|
reducers[ACTIONS.USER_EMAIL_VERIFY_RETRY_STARTED] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
resendingVerificationEmail: true,
|
resendingVerificationEmail: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_EMAIL_VERIFY_RETRY_SUCCESS] = state =>
|
reducers[ACTIONS.USER_EMAIL_VERIFY_RETRY_SUCCESS] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
resendingVerificationEmail: false,
|
resendingVerificationEmail: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_EMAIL_VERIFY_RETRY_FAILURE] = state =>
|
reducers[ACTIONS.USER_EMAIL_VERIFY_RETRY_FAILURE] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
resendingVerificationEmail: false,
|
resendingVerificationEmail: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_SET_REFERRER_STARTED] = state =>
|
reducers[ACTIONS.USER_SET_REFERRER_STARTED] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
referrerSetIsPending: true,
|
referrerSetIsPending: true,
|
||||||
referrerSetError: defaultState.referrerSetError,
|
referrerSetError: defaultState.referrerSetError,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_SET_REFERRER_SUCCESS] = state =>
|
reducers[ACTIONS.USER_SET_REFERRER_SUCCESS] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
referrerSetIsPending: false,
|
referrerSetIsPending: false,
|
||||||
referrerSetError: defaultState.referrerSetError,
|
referrerSetError: defaultState.referrerSetError,
|
||||||
|
@ -326,25 +326,25 @@ reducers[ACTIONS.USER_SET_REFERRER_FAILURE] = (state, action) =>
|
||||||
referrerSetError: action.data.error.message,
|
referrerSetError: action.data.error.message,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_SET_REFERRER_RESET] = state =>
|
reducers[ACTIONS.USER_SET_REFERRER_RESET] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
referrerSetIsPending: false,
|
referrerSetIsPending: false,
|
||||||
referrerSetError: defaultState.referrerSetError,
|
referrerSetError: defaultState.referrerSetError,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_PASSWORD_EXISTS] = state =>
|
reducers[ACTIONS.USER_PASSWORD_EXISTS] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
passwordExistsForUser: true,
|
passwordExistsForUser: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_PASSWORD_RESET_STARTED] = state =>
|
reducers[ACTIONS.USER_PASSWORD_RESET_STARTED] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
passwordResetPending: true,
|
passwordResetPending: true,
|
||||||
passwordResetSuccess: defaultState.passwordResetSuccess,
|
passwordResetSuccess: defaultState.passwordResetSuccess,
|
||||||
passwordResetError: null,
|
passwordResetError: null,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_PASSWORD_RESET_SUCCESS] = state =>
|
reducers[ACTIONS.USER_PASSWORD_RESET_SUCCESS] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
passwordResetPending: false,
|
passwordResetPending: false,
|
||||||
passwordResetSuccess: true,
|
passwordResetSuccess: true,
|
||||||
|
@ -356,13 +356,13 @@ reducers[ACTIONS.USER_PASSWORD_RESET_FAILURE] = (state, action) =>
|
||||||
passwordResetError: action.data.error,
|
passwordResetError: action.data.error,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_PASSWORD_SET_STARTED] = state =>
|
reducers[ACTIONS.USER_PASSWORD_SET_STARTED] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
passwordSetPending: true,
|
passwordSetPending: true,
|
||||||
passwordSetSuccess: defaultState.passwordSetSuccess,
|
passwordSetSuccess: defaultState.passwordSetSuccess,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.USER_PASSWORD_SET_SUCCESS] = state =>
|
reducers[ACTIONS.USER_PASSWORD_SET_SUCCESS] = (state) =>
|
||||||
Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
passwordSetPending: false,
|
passwordSetPending: false,
|
||||||
passwordSetSuccess: true,
|
passwordSetSuccess: true,
|
||||||
|
|
|
@ -59,7 +59,7 @@ function deleteCookie(name) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setSavedPassword(value, saveToDisk) {
|
function setSavedPassword(value, saveToDisk) {
|
||||||
return new Promise(resolve => {
|
return new Promise((resolve) => {
|
||||||
const password = value === undefined || value === null ? '' : value;
|
const password = value === undefined || value === null ? '' : value;
|
||||||
sessionPassword = password;
|
sessionPassword = password;
|
||||||
|
|
||||||
|
@ -74,17 +74,17 @@ function setSavedPassword(value, saveToDisk) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSavedPassword() {
|
function getSavedPassword() {
|
||||||
return new Promise(resolve => {
|
return new Promise((resolve) => {
|
||||||
if (sessionPassword) {
|
if (sessionPassword) {
|
||||||
resolve(sessionPassword);
|
resolve(sessionPassword);
|
||||||
}
|
}
|
||||||
|
|
||||||
return getPasswordFromCookie().then(p => resolve(p));
|
return getPasswordFromCookie().then((p) => resolve(p));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPasswordFromCookie() {
|
function getPasswordFromCookie() {
|
||||||
return new Promise(resolve => {
|
return new Promise((resolve) => {
|
||||||
let password;
|
let password;
|
||||||
password = getCookie(SAVED_PASSWORD);
|
password = getCookie(SAVED_PASSWORD);
|
||||||
resolve(password);
|
resolve(password);
|
||||||
|
@ -92,7 +92,7 @@ function getPasswordFromCookie() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteSavedPassword() {
|
function deleteSavedPassword() {
|
||||||
return new Promise(resolve => {
|
return new Promise((resolve) => {
|
||||||
deleteCookie(SAVED_PASSWORD);
|
deleteCookie(SAVED_PASSWORD);
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
|
@ -107,14 +107,14 @@ function setAuthToken(value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteAuthToken() {
|
function deleteAuthToken() {
|
||||||
return new Promise(resolve => {
|
return new Promise((resolve) => {
|
||||||
deleteCookie(AUTH_TOKEN);
|
deleteCookie(AUTH_TOKEN);
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function doSignOutCleanup() {
|
function doSignOutCleanup() {
|
||||||
return new Promise(resolve => {
|
return new Promise((resolve) => {
|
||||||
deleteAuthToken();
|
deleteAuthToken();
|
||||||
deleteSavedPassword();
|
deleteSavedPassword();
|
||||||
resolve();
|
resolve();
|
||||||
|
|
Loading…
Reference in a new issue