Skip to content

Commit

Permalink
AI Assistant: remove try again toolbar button (#34464)
Browse files Browse the repository at this point in the history
* make handleTryAgain optional so to remove when not present

* add changelog entry
  • Loading branch information
CGastrell committed Dec 12, 2023
1 parent 63431fd commit dec600e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: enhancement

AI Assistant: remove "Try Again" toolbar button
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ const ToolbarControls = ( {
</>
) }

{ ( showRetry || contentIsLoaded ) && (
{ ( showRetry || handleTryAgain ) && (
<ToolbarGroup>
{ ! showRetry && contentIsLoaded && (
{ ! showRetry && contentIsLoaded && handleTryAgain && (
<ToolbarButton onClick={ handleTryAgain }>
{ __( 'Try Again', 'jetpack' ) }
</ToolbarButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ export default function AIAssistantEdit( { attributes, setAttributes, clientId,
handleAcceptTitle={ handleAcceptTitle }
handleGetSuggestion={ handleGetSuggestion }
handleImageRequest={ handleImageRequest }
handleTryAgain={ handleTryAgain }
handleTryAgain={ null }
showRetry={ showRetry }
contentBefore={ contentBefore }
hasPostTitle={ !! postTitle?.length }
Expand Down

0 comments on commit dec600e

Please sign in to comment.