From 1c62dbc64f4b29cd3ef55103fbf708e2aa065693 Mon Sep 17 00:00:00 2001 From: AlexanderEngelhardt Date: Thu, 1 Aug 2024 12:01:35 +0300 Subject: [PATCH] AIExample is optional - fix to type error --- src/client/pages/InventorsAssistant/FirstStep.tsx | 6 +++--- src/client/pages/InventorsAssistant/LlmInputFeedback.tsx | 2 +- src/client/pages/InventorsAssistant/UserInput.tsx | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client/pages/InventorsAssistant/FirstStep.tsx b/src/client/pages/InventorsAssistant/FirstStep.tsx index e1ecef8a..1667eb5c 100644 --- a/src/client/pages/InventorsAssistant/FirstStep.tsx +++ b/src/client/pages/InventorsAssistant/FirstStep.tsx @@ -47,7 +47,7 @@ const FirstStep: React.FC = ({ const [aiElaboration3, setAiElaboration3] = useState('') - const handleFirstCheck = async (aiExample: string) => { + const handleFirstCheck = async (aiExample?: string) => { setCurrentStep(2) setAiInputFeedbackSuccess1('info') const message = aiExample || inventiveMessage @@ -71,7 +71,7 @@ const FirstStep: React.FC = ({ } } - const handleSecondCheck = async (aiExample: string) => { + const handleSecondCheck = async (aiExample?: string) => { setCurrentStep(3) setAiInputFeedbackSuccess2('info') const message = aiExample || publicityMessage @@ -95,7 +95,7 @@ const FirstStep: React.FC = ({ } } - const handleThirdCheck = async (aiExample: string) => { + const handleThirdCheck = async (aiExample?: string) => { setAiInputFeedbackSuccess3('info') const message = aiExample || industrialMessage const response = await apiClient.post('/llm/step1check3', { diff --git a/src/client/pages/InventorsAssistant/LlmInputFeedback.tsx b/src/client/pages/InventorsAssistant/LlmInputFeedback.tsx index 2bdc2289..8a82435b 100644 --- a/src/client/pages/InventorsAssistant/LlmInputFeedback.tsx +++ b/src/client/pages/InventorsAssistant/LlmInputFeedback.tsx @@ -9,7 +9,7 @@ type LlmInputFeedbackProps = { alertSeverity: 'info' | 'success' | 'warning' aiElaboration: string setUserInput: React.Dispatch> - handleStepCheck: (aiElaboration?: string) => void + handleStepCheck: (aiExample?: string) => void } const LlmInputFeedback = ({ diff --git a/src/client/pages/InventorsAssistant/UserInput.tsx b/src/client/pages/InventorsAssistant/UserInput.tsx index 02d9ab17..524fb472 100644 --- a/src/client/pages/InventorsAssistant/UserInput.tsx +++ b/src/client/pages/InventorsAssistant/UserInput.tsx @@ -7,7 +7,7 @@ import LlmInputFeedback from './LlmInputFeedback' type UserInputProps = { inventiveMessage: string setUserInput: React.Dispatch> - handleStepCheck: (aiElaboration?: string) => void + handleStepCheck: (aiExample?: string) => void aiInputFeedback: string aiInputFeedbackSuccess: 'info' | 'success' | 'warning' aiElaboration: string