fix: Fixes username invite issue (#10998)
* Fixes username invite issue * Ensure we only suggest email invites in org members --------- Co-authored-by: Udit Takkar <[email protected]>
This commit is contained in:
1 parent
0e181f6d9f
commit
376b38d4ed
4 files changed
+11
-5
No files matched your search
@@ -32,6 +32,7 @@ import { GoogleWorkspaceInviteButton } from "./GoogleWorkspaceInviteButton";
|
||||
|
||||
type MemberInvitationModalProps = {
|
||||
isOpen: boolean;
|
||||
justEmailInvites?: boolean;
|
||||
onExit: () => void;
|
||||
orgMembers?: RouterOutputs["viewer"]["organizations"]["getMembers"];
|
||||
onSubmit: (values: NewMemberForm, resetFields: () => void) => void;
|
||||
@@ -206,7 +207,7 @@ export default function MemberInvitationModal(props: MemberInvitationModalProps)
|
||||
render={({ field: { onChange }, fieldState: { error } }) => (
|
||||
<>
|
||||
<TextField
|
||||
label={t("email_or_username")}
|
||||
label={props.justEmailInvites ? t("email") : t("email_or_username")}
|
||||
id="inviteUser"
|
||||
name="inviteUser"
|
||||
placeholder="[email protected]"
|
||||
|
||||
@@ -60,6 +60,7 @@ export function InviteMemberModal(props: Props) {
|
||||
});
|
||||
}}
|
||||
teamId={orgId}
|
||||
justEmailInvites={!!orgId}
|
||||
isLoading={inviteMemberMutation.isLoading}
|
||||
onSubmit={(values) => {
|
||||
inviteMemberMutation.mutate({
|
||||
|
||||
Reference in new issue
Block a user