From 7e30c31456dd1a70f27e4a9600a66fc7dfbf9be9 Mon Sep 17 00:00:00 2001 From: Luiz Kowalski Date: Thu, 12 Sep 2024 15:00:05 -0300 Subject: [PATCH] Include type suggestions --- .../components/title-optimization/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/title-optimization/index.tsx b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/title-optimization/index.tsx index 09ed829da3c80..01acfac40d607 100644 --- a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/title-optimization/index.tsx +++ b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/title-optimization/index.tsx @@ -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 (
@@ -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();