Skip to content

fix typo Nember to Member #1639

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: test-ai-budy
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions src/components/UserCard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ class UserCard extends Component {
isUpdatingPermission: true
})

const { user, updateProjectNember } = this.props
const { user, updateProjectMember } = this.props

try {
const newUserInfoRole = await updateProjectMemberRole(user.projectId, user.id, newRole)
updateProjectNember(newUserInfoRole)
updateProjectMember(newUserInfoRole)
this.setState({ showSuccessModal: true })
} catch (e) {
const error = _.get(
Expand All @@ -72,7 +72,7 @@ class UserCard extends Component {
)
}
{this.state.showWarningModal && (
<AlertModal
<AlertsModal

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high
correctness
The component name was changed from AlertModal to AlertsModal. Ensure that the new component AlertsModal is correctly imported at the top of the file and that it exists in the codebase. If this change was unintentional, it could lead to runtime errors.

title={`Cannot update permission for ${user.handle}`}
message={this.state.permissionUpdateError}
theme={theme}
Expand Down Expand Up @@ -190,7 +190,7 @@ class UserCard extends Component {
UserCard.propTypes = {
isInvite: PropTypes.bool,
user: PropTypes.object,
updateProjectNember: PropTypes.func.isRequired,
updateProjectMember: PropTypes.func.isRequired,
onRemoveClick: PropTypes.func.isRequired,
isEditable: PropTypes.bool
}
Expand Down
14 changes: 7 additions & 7 deletions src/components/Users/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ class Users extends Component {
async onRemoveConfirmClick () {
if (this.state.isRemoving) { return }

const { removeProjectNember, invitedMembers } = this.props
const { removeProjectMember, invitedMembers } = this.props
const userToRemove = this.state.userToRemove
const isInvite = !!_.find(invitedMembers, { email: userToRemove.email })
try {
this.setState({ isRemoving: true })
await (
isInvite ? deleteProjectMemberInvite(userToRemove.projectId, userToRemove.id) : removeUserFromProject(userToRemove.projectId, userToRemove.id)
)
removeProjectNember(userToRemove)
removeProjectMember(userToRemove)

this.resetRemoveUserState()
} catch (e) {
Expand Down Expand Up @@ -156,7 +156,7 @@ class Users extends Component {
projects,
projectMembers,
invitedMembers,
updateProjectNember,
updateProjectMember,
isEditable,
isSearchingUserProjects,
resultSearchUserProjects,
Expand Down Expand Up @@ -277,7 +277,7 @@ class Users extends Component {
<UserCard
user={member}
onRemoveClick={this.onRemoveClick}
updateProjectNember={updateProjectNember}
updateProjectMember={updateProjectMember}
isEditable={isEditable} />
</li>
)
Expand All @@ -293,7 +293,7 @@ class Users extends Component {
isInvite
user={member}
onRemoveClick={this.onRemoveClick}
updateProjectNember={updateProjectNember}
updateProjectMember={updateProjectMember}
isEditable={isEditable} />
</li>
)
Expand All @@ -311,8 +311,8 @@ class Users extends Component {

Users.propTypes = {
loadProject: PropTypes.func.isRequired,
updateProjectNember: PropTypes.func.isRequired,
removeProjectNember: PropTypes.func.isRequired,
updateProjectMember: PropTypes.func.isRequired,
removeProjectMember: PropTypes.func.isRequired,
addNewProjectInvite: PropTypes.func.isRequired,
addNewProjectMember: PropTypes.func.isRequired,
auth: PropTypes.object,
Expand Down
12 changes: 6 additions & 6 deletions src/containers/Users/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class Users extends Component {
isAdmin: false
}
this.loadProject = this.loadProject.bind(this)
this.updateProjectNember = this.updateProjectNember.bind(this)
this.removeProjectNember = this.removeProjectNember.bind(this)
this.updateProjectMember = this.updateProjectMember.bind(this)
this.removeProjectMember = this.removeProjectMember.bind(this)
this.addNewProjectInvite = this.addNewProjectInvite.bind(this)
this.addNewProjectMember = this.addNewProjectMember.bind(this)
this.loadNextProjects = this.loadNextProjects.bind(this)
Expand Down Expand Up @@ -92,7 +92,7 @@ class Users extends Component {
})
}

updateProjectNember (newMemberInfo) {
updateProjectMember (newMemberInfo) {
const { projectMembers } = this.state
const newProjectMembers = projectMembers.map(pm => pm.id === newMemberInfo.id ? ({
...pm,
Expand All @@ -105,7 +105,7 @@ class Users extends Component {
this.updateLoginUserRoleInProject(newProjectMembers, loggedInUser)
}

removeProjectNember (projectMember) {
removeProjectMember (projectMember) {
const { projectMembers, invitedMembers } = this.state
const newProjectMembers = _.filter(projectMembers, pm => pm.id !== projectMember.id)
const newInvitedMembers = _.filter(invitedMembers, pm => pm.id !== projectMember.id)
Expand Down Expand Up @@ -156,8 +156,8 @@ class Users extends Component {
<UsersComponent
projects={projects}
loadProject={this.loadProject}
updateProjectNember={this.updateProjectNember}
removeProjectNember={this.removeProjectNember}
updateProjectMember={this.updateProjectMember}
removeProjectMember={this.removeProjectMember}
addNewProjectMember={this.addNewProjectMember}
addNewProjectInvite={this.addNewProjectInvite}
loadNextProjects={this.loadNextProjects}
Expand Down