diff --git a/src/app/image-selector.tsx b/src/app/image-selector.tsx index a339e67..faa7cac 100644 --- a/src/app/image-selector.tsx +++ b/src/app/image-selector.tsx @@ -16,7 +16,9 @@ export function ImageSelector({ const [, setMessages] = useUIState(); const {submitUserMessage} = useActions(); - const formAction = async () => { + const handleClick = async () => { + document.body.scrollIntoView({block: `end`, behavior: `smooth`}); + try { const message = await submitUserMessage( `Tell me more about image ${url}, keep it short.`, @@ -36,5 +38,9 @@ export function ImageSelector({ document.body.scrollIntoView({block: `end`, behavior: `smooth`}); }; - return ; + return ( + + ); }