88 Center ,
99 Flex ,
1010 HStack ,
11+ Image ,
1112 Text ,
1213 useDisclosure ,
1314 VStack ,
@@ -22,6 +23,7 @@ import { CREATE_FLOW_WITH_STEPS } from '@/graphql/mutations/create-flow-with-ste
2223import { GENERATE_AI_STEPS } from '@/graphql/mutations/generate-ai-steps'
2324import { TOOLBOX_ACTIONS } from '@/helpers/toolbox'
2425import { useAiBuilderContext } from '@/pages/AiBuilder/AiBuilderContext'
26+ import aiBuilderErrorImg from '@/pages/AiBuilder/assets/AiBuilderError.svg'
2527import { getPromptFromFormInput } from '@/pages/AiBuilder/helpers'
2628import { AiFormData } from '@/pages/AiBuilder/schema'
2729
@@ -54,10 +56,11 @@ export default function StepsPreview() {
5456 ddSessionId,
5557 } = useAiBuilderContext ( )
5658
57- const [ error , setError ] = useState < boolean > ( false )
5859 const { isOpen, onClose, onOpen } = useDisclosure ( )
5960 const isMobile = useIsMobile ( )
6061 const navigate = useNavigate ( )
62+ const [ error , setError ] = useState < boolean > ( true )
63+
6164 const [ createFlowWithSteps , { loading : isCreatingFlow } ] = useMutation (
6265 CREATE_FLOW_WITH_STEPS ,
6366 )
@@ -190,7 +193,7 @@ export default function StepsPreview() {
190193
191194 if ( error ) {
192195 return (
193- < Center h = "100 %" >
196+ < Center h = "80 %" >
194197 < Flex
195198 flexDir = "column"
196199 alignItems = "center"
@@ -199,8 +202,17 @@ export default function StepsPreview() {
199202 w = "100%"
200203 maxW = "400px"
201204 >
205+ < Image src = { aiBuilderErrorImg } alt = "ai-bulilder-error" w = "400px" />
202206 < Text textStyle = "h4" fontWeight = "normal" >
203- Something went wrong
207+ Something went wrong.
208+ </ Text >
209+ < Text > Modify your prompt or try again.</ Text >
210+ < Text >
211+ If this issue persists,{ ' ' }
212+ < a href = { URLS . SUPPORT_FORM_LINK } target = "_blank" rel = "noreferrer" >
213+ contact us
214+ </ a >
215+ .
204216 </ Text >
205217 < Button onClick = { retryGenerateAiSteps } > Try again</ Button >
206218 </ Flex >
0 commit comments