diff --git a/apps/web/src/components/ui/inputs/InputTextAreaButton.tsx b/apps/web/src/components/ui/inputs/InputTextAreaButton.tsx index b293f417d..8fe8cb60c 100644 --- a/apps/web/src/components/ui/inputs/InputTextAreaButton.tsx +++ b/apps/web/src/components/ui/inputs/InputTextAreaButton.tsx @@ -108,29 +108,25 @@ const SubmitButton: React.FC<{ onSubmitPreflight: () => void; onStop?: () => void; }> = React.memo(({ disabled, sendIcon, loading, loadingIcon, onSubmitPreflight, onStop }) => { - const memoizedPrefix = useMemo(() => { - return ( + const prefix = ( +
-
- {sendIcon} -
-
- {loadingIcon} -
+ className={`absolute inset-0 transition-all duration-300 ease-out ${loading ? 'scale-80 opacity-0' : 'scale-100 opacity-100'}`}> + {sendIcon}
- ); - }, [loading, sendIcon, loadingIcon]); +
+ {loadingIcon} +
+
+ ); return (