diff --git a/components/ContactForm.tsx b/components/ContactForm.tsx index b0eac7eb..eb9d3487 100644 --- a/components/ContactForm.tsx +++ b/components/ContactForm.tsx @@ -58,6 +58,29 @@ export default function ContactForm() { ); } + if (status === 'error') { + return ( + + + + + + + + + + {t('form.errorTitle') || 'Submission Failed!'} + + + {t('form.error') || 'Something went wrong. Please check your input and try again.'} + + setStatus('idle')} variant="saturated" size="lg" className="w-full bg-destructive hover:bg-destructive/90 text-destructive-foreground border-destructive shadow-lg shadow-destructive/20"> + {t('form.tryAgain') || 'Try Again'} + + + ); + } + return ( @@ -100,11 +123,6 @@ export default function ContactForm() { required /> - {status === 'error' && ( - - {t('form.error') || 'An error occurred. Please try again later.'} - - )} {t('successDesc', { productName })} - setStatus('idle')} className="inline-flex items-center text-[9px] font-bold uppercase tracking-[0.2em] text-primary hover:text-accent transition-colors group" > @@ -71,6 +71,32 @@ export default function RequestQuoteForm({ productName }: RequestQuoteFormProps) ); } + if (status === 'error') { + return ( + + + + + + + + + {t('errorTitle') || 'Submission Failed'} + + {t('errorDesc') || 'Something went wrong. Please try again.'} + + setStatus('idle')} + className="inline-flex items-center text-[9px] font-bold uppercase tracking-[0.2em] text-destructive hover:text-destructive/80 transition-colors group" + > + + {t('tryAgain') || 'Try Again'} + + + + ); + } + return (
+ {t('form.error') || 'Something went wrong. Please check your input and try again.'} +
+ {t('errorDesc') || 'Something went wrong. Please try again.'} +