Skip to content

Commit

Permalink
EPMRPP-96556 || Code Review fixes - 2
Browse files Browse the repository at this point in the history
  • Loading branch information
iso9000t committed Nov 4, 2024
1 parent 51e9543 commit 5c1e724
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import { AsyncAutocomplete } from 'components/inputs/autocompletes/asyncAutocomp
import { InputDropdown } from 'components/inputs/inputDropdown';
import { MEMBERS_PAGE_EVENTS } from 'components/main/analytics/events';
import { InputUserSearch, makeOptions } from 'components/inputs/inputUserSearch';
import { fetchProjectAction } from 'controllers/project/actionCreators';
import styles from './inviteUserModal.scss';

const cx = classNames.bind(styles);
Expand Down Expand Up @@ -104,7 +103,6 @@ const inviteFormSelector = formValueSelector('inviteUserForm');
showScreenLockAction,
hideScreenLockAction,
showNotification,
fetchProjectAction,
},
)
@reduxForm({
Expand Down Expand Up @@ -133,7 +131,6 @@ export class InviteUserModal extends Component {
isAdmin: PropTypes.bool,
dirty: PropTypes.bool,
areUserSuggestionsAllowed: PropTypes.bool.isRequired,
fetchProjectAction: PropTypes.func.isRequired,
};

static defaultProps = {
Expand Down Expand Up @@ -211,7 +208,6 @@ export class InviteUserModal extends Component {
type: NOTIFICATION_TYPES.SUCCESS,
});
onInvite();
this.props.fetchProjectAction(selectedProject, false);
})
.catch((err) => {
this.props.showNotification({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ import { RadioGroup } from 'componentLibrary/radioGroup';
import { EMAIL } from 'common/constants/pluginNames';
import { FieldTextFlex } from 'componentLibrary/fieldTextFlex';
import { ruleField } from 'pages/inside/projectSettingsPageContainer/content/notifications/propTypes';
import { fetchProjectAction } from 'controllers/project/actionCreators';
import { projectIdSelector } from 'controllers/pages';
import { capitalizeWord } from '../util';
import { RecipientsContainer } from './recipientsContainer';
import { LaunchNamesContainer } from './launchNamesContainer';
Expand Down Expand Up @@ -213,12 +215,14 @@ const AddEditNotificationModal = ({
}) => {
const { formatMessage } = useIntl();
const dispatch = useDispatch();
const projectId = useSelector(projectIdSelector);
const [isEditorShown, setShowEditor] = React.useState(data.notification.attributes.length > 0);
const attributesValue =
useSelector((state) => attributesValueSelector(state, ATTRIBUTES_FIELD_KEY)) ?? [];

useEffect(() => {
initialize(data.notification);
dispatch(fetchProjectAction(projectId, false));
}, []);

const caseOptions = [
Expand Down

0 comments on commit 5c1e724

Please sign in to comment.