Skip to content

Commit

Permalink
Merge pull request #30604 from Expensify/neil-secondary-members-cleanup
Browse files Browse the repository at this point in the history
[No QA] Clean up for added by secondary login messages
  • Loading branch information
MonilBhavsar authored Oct 31, 2023
2 parents 7efe110 + 3044c63 commit cbd3001
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/MessagesRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback';
import Tooltip from './Tooltip';

const propTypes = {
/* The messages to display */
/** The messages to display */
messages: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.object]))])),

/* The type of message, 'error' shows a red dot, 'success' shows a green dot */
/** The type of message, 'error' shows a red dot, 'success' shows a green dot */
type: PropTypes.oneOf(['error', 'success']).isRequired,

/** A function to run when the X button next to the message is clicked */
Expand Down
4 changes: 2 additions & 2 deletions src/libs/actions/Policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,7 @@ function clearErrors(policyID) {
*
* @param {String} policyID
*/
function dismissAddedWithPrimaryMessages(policyID) {
function dismissAddedWithPrimaryLoginMessages(policyID) {
Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`, {primaryLoginsInvited: null});
}

Expand Down Expand Up @@ -1388,7 +1388,7 @@ export {
removeWorkspace,
setWorkspaceInviteMembersDraft,
clearErrors,
dismissAddedWithPrimaryMessages,
dismissAddedWithPrimaryLoginMessages,
openDraftWorkspaceRequest,
buildOptimisticPolicyRecentlyUsedCategories,
createDraftInitialWorkspace,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/workspace/WorkspaceMembersPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ function WorkspaceMembersPage(props) {
type="success"
messages={{0: props.translate('workspace.people.addedWithPrimary')}}
containerStyles={[styles.pb5, styles.ph5]}
onClose={() => Policy.dismissAddedWithPrimaryMessages(policyID)}
onClose={() => Policy.dismissAddedWithPrimaryLoginMessages(policyID)}
/>
);
};
Expand Down

0 comments on commit cbd3001

Please sign in to comment.