Skip to content

Commit

Permalink
Include type suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
lhkowalski committed Sep 12, 2024
1 parent c527fd4 commit 7e30c31
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const TitleOptimizationErrorMessage = ( { error }: { error: TitleOptimizationErr
}

// Use the provided message, if available, otherwise use the generic error message
const errorMessage = error?.message ? error.message : genericErrorMessage;
const errorMessage = error.message ? error.message : genericErrorMessage;

return (
<div className="jetpack-ai-title-optimization__error">
Expand Down Expand Up @@ -103,7 +103,7 @@ export default function TitleOptimization( {
const [ isTitleOptimizationModalVisible, setIsTitleOptimizationModalVisible ] = useState( false );
const [ generating, setGenerating ] = useState( false );
const [ options, setOptions ] = useState( [] );
const [ error, setError ] = useState< TitleOptimizationError >( null );
const [ error, setError ] = useState< TitleOptimizationError | null >( null );
const [ optimizationKeywords, setOptimizationKeywords ] = useState( '' );
const { editPost } = useDispatch( 'core/editor' );
const { autosave } = useAutoSaveAndRedirect();
Expand Down

0 comments on commit 7e30c31

Please sign in to comment.