+ { __(
+ 'No matching authors found.',
+ 'multi-author-posts'
+ ) }
+
+ ) }
);
}
/**
* Invite-link section (shown only when the current user can manage co-authors).
+ * @param root0
+ * @param root0.postId
*/
function InviteSection( { postId } ) {
// Plaintext URL is only available in-memory, immediately after creation.
@@ -186,18 +215,24 @@ function InviteSection( { postId } ) {
}, [ postId ] );
const handleCopy = useCallback( () => {
- if ( ! inviteUrl ) return;
+ if ( ! inviteUrl ) {
+ return;
+ }
navigator.clipboard?.writeText( inviteUrl ).then( () => {
setCopied( true );
setTimeout( () => setCopied( false ), 2000 );
} );
}, [ inviteUrl ] );
- if ( isLoading ) return
- { __( 'Shared invite link', 'multi-author-posts' ) }
+
+ { __( 'Shared invite link', 'multi-author-posts' ) }
+
{ __(
'Anyone with this link who is registered on the network can join as a co-author. The link is valid for 24 hours and is only shown once — copy it now.',
@@ -213,7 +248,11 @@ function InviteSection( { postId } ) {
onClick={ ( e ) => e.target.select() }
/>
-