done - but translations

This commit is contained in:
okbel
2018-05-02 21:01:08 -03:00
parent 59cac9db8b
commit a649bd8252
5 changed files with 4 additions and 44 deletions
@@ -1,9 +0,0 @@
import * as actions from './constants';
export const showAddEmailDialog = () => ({
type: actions.SHOW_ADD_EMAIL_DIALOG,
});
export const hideAddEmailDialog = () => ({
type: actions.HIDE_ADD_EMAIL_DIALOG,
});
@@ -1,4 +0,0 @@
const prefix = 'TALK_AUTH_LOCAL';
export const SHOW_ADD_EMAIL_DIALOG = `${prefix}_SHOW_ADD_EMAIL_DIALOG`;
export const HIDE_ADD_EMAIL_DIALOG = `${prefix}_HIDE_ADD_EMAIL_DIALOG`;
@@ -1,6 +1,6 @@
import { compose, gql } from 'react-apollo';
import { bindActionCreators } from 'redux';
import { connect, withFragments } from 'plugin-api/beta/client/hocs';
import { connect, withFragments, excludeIf } from 'plugin-api/beta/client/hocs';
import AddEmailAddressDialog from '../components/AddEmailAddressDialog';
import { notify } from 'coral-framework/actions/notification';
@@ -22,12 +22,9 @@ const withData = withFragments({
`,
});
const mapStateToProps = ({ talkPluginLocalAuth: state }) => ({
showAddEmailDialog: state.showAddEmailDialog,
});
export default compose(
connect(mapStateToProps, mapDispatchToProps),
connect(null, mapDispatchToProps),
withAttachLocalAuth,
withData
withData,
excludeIf(({ root: { me } }) => !me || me.email)
)(AddEmailAddressDialog);
@@ -2,10 +2,8 @@ import ChangePassword from './containers/ChangePassword';
import AddEmailAddressDialog from './containers/AddEmailAddressDialog';
import Profile from './containers/Profile';
import translations from './translations.yml';
import reducer from './reducer';
export default {
reducer,
translations,
slots: {
profileHeader: [Profile],
@@ -1,22 +0,0 @@
import * as actions from './constants';
const initialState = {
showAddEmailDialog: true,
};
export default function reducer(state = initialState, action) {
switch (action.type) {
case actions.SHOW_ADD_EMAIL_DIALOG:
return {
...state,
showAddEmailDialog: true,
};
case actions.HIDE_ADD_EMAIL_DIALOG:
return {
...state,
showAddEmailDialog: false,
};
default:
return state;
}
}