diff --git a/common/app/Router/Link.jsx b/common/app/Router/Link.jsx index 4297d31802..cdbef8268b 100644 --- a/common/app/Router/Link.jsx +++ b/common/app/Router/Link.jsx @@ -22,6 +22,7 @@ const propTypes = { replace: PropTypes.bool, routesMap: PropTypes.object, shouldDispatch: PropTypes.bool, + style: PropTypes.object, target: PropTypes.string, to: PropTypes.oneOfType([ PropTypes.object, PropTypes.string ]).isRequired }; @@ -36,6 +37,7 @@ export const Link = ( replace, routesMap, shouldDispatch = true, + style, target, to } @@ -70,6 +72,7 @@ export const Link = ( return ( {children} diff --git a/common/app/entities/index.js b/common/app/entities/index.js index c17146a35e..2b80834acd 100644 --- a/common/app/entities/index.js +++ b/common/app/entities/index.js @@ -24,7 +24,7 @@ export const updateUserFlag = createAction( ); // updateUserEmail(username: String, email: String) => Action export const updateUserEmail = createAction( - types.updateUserFlag, + types.updateUserEmail, (username, email) => ({ username, email }) ); // updateUserLang(username: String, lang: String) => Action diff --git a/common/app/routes/Settings/Settings.jsx b/common/app/routes/Settings/Settings.jsx index bdb1ceb54c..6d84386346 100644 --- a/common/app/routes/Settings/Settings.jsx +++ b/common/app/routes/Settings/Settings.jsx @@ -184,7 +184,7 @@ export class Settings extends React.Component { className='btn-link-social' onClick={ toggleNightMode } > - NightMode + Toggle Night Mode diff --git a/common/app/routes/Settings/redux/update-user-epic.js b/common/app/routes/Settings/redux/update-user-epic.js index f24bf1e21f..bf5d2d66f9 100644 --- a/common/app/routes/Settings/redux/update-user-epic.js +++ b/common/app/routes/Settings/redux/update-user-epic.js @@ -6,7 +6,6 @@ import { makeToast } from '../../../Toasts/redux'; import { fetchChallenges, doActionOnError, - userSelector } from '../../../redux'; import { @@ -41,7 +40,7 @@ export function updateUserEmailEpic(actions, { getState }) { const ajaxUpdate = postJSON$('/update-my-email', body) .map(({ message }) => makeToast({ message })) .catch(doActionOnError(() => oldEmail ? - updateUserFlag(username, oldEmail) : + updateUserEmail(username, oldEmail) : null )); return Observable.merge(optimisticUpdate, ajaxUpdate); diff --git a/common/app/routes/Settings/routes/update-email/Update-Email.jsx b/common/app/routes/Settings/routes/update-email/Update-Email.jsx index 84edede9a7..6c0e782a97 100644 --- a/common/app/routes/Settings/routes/update-email/Update-Email.jsx +++ b/common/app/routes/Settings/routes/update-email/Update-Email.jsx @@ -12,7 +12,7 @@ import { reduxForm } from 'redux-form'; import { isEmail } from 'validator'; import { Link } from '../../../../Router'; -import { getValidationState } from '../../../../utils/form'; +import { getValidationState, DOMOnlyProps } from '../../../../utils/form'; import { onRouteSettings, updateMyEmail @@ -93,10 +93,10 @@ export class UpdateEmail extends React.Component { validationState={ getValidationState(email) } > { !email.error ? @@ -112,7 +112,7 @@ export class UpdateEmail extends React.Component { { !duplicate.error ? @@ -131,7 +131,10 @@ export class UpdateEmail extends React.Component { { buttonCopy }
- +