@@ -94,17 +94,23 @@ export default function OrgInviteModal(props: { orgId: string; inviteId: string;
9494 // Case 2: failed to get the invitation data from API.
9595 else if ( orgInvitesQuery . isError ) {
9696 title = t ( 'Invitation not found' )
97- content = < Alert type = 'error' > { orgInvitesQuery . error . detail ?? t ( 'Could not find invitation ##invite_id## from organization ##org_id##' )
98- . replace ( '##invite_id##' , props . inviteId )
99- . replace ( '##org_id##' , props . orgId ) }
97+ content = (
98+ < Alert type = 'error' >
99+ { orgInvitesQuery . error . detail ??
100+ t ( 'Could not find invitation ##invite_id## from organization ##org_id##' )
101+ . replace ( '##invite_id##' , props . inviteId )
102+ . replace ( '##org_id##' , props . orgId ) }
100103 </ Alert >
104+ )
101105 }
102106 // Case 3: failed to accept or decline invitation (API response).
103107 else if ( orgInvitesPatch . isError ) {
104108 title = t ( 'Unable to join ##TEAM_OR_ORGANIZATION_NAME##' ) . replace ( '##TEAM_OR_ORGANIZATION_NAME##' , orgName )
105109 content = (
106110 < Stack >
107- < Alert type = 'error' > { ( orgInvitesPatch . error as ErrorDetail ) . detail ?? t ( 'Failed to respond to invitation' ) } </ Alert >
111+ < Alert type = 'error' >
112+ { ( orgInvitesPatch . error as ErrorDetail ) . detail ?? t ( 'Failed to respond to invitation' ) }
113+ </ Alert >
108114
109115 < Group justify = 'flex-end' >
110116 < Button
@@ -187,11 +193,7 @@ export default function OrgInviteModal(props: { orgId: string; inviteId: string;
187193 }
188194
189195 return (
190- < Modal
191- opened = { isModalOpen }
192- onClose = { ( ) => setIsModalOpen ( false ) }
193- title = { title }
194- >
196+ < Modal opened = { isModalOpen } onClose = { ( ) => setIsModalOpen ( false ) } title = { title } >
195197 { /* We don't want "x" button to get focus (see https://mantine.dev/core/modal/#initial-focus) */ }
196198 < FocusTrap . InitialFocus />
197199 { content }
0 commit comments