diff --git a/components/custom/chat.tsx b/components/custom/chat.tsx
index bdd8424..382a89c 100644
--- a/components/custom/chat.tsx
+++ b/components/custom/chat.tsx
@@ -40,15 +40,16 @@ export function Chat({
>
{messages.length === 0 && }
- {messages.map((message, index) => (
+ {messages.map((message) => (
))}
+
void;
}) {
const textareaRef = useRef
(null);
+ const { width } = useWindowSize();
useEffect(() => {
if (textareaRef.current) {
@@ -89,7 +91,11 @@ export function MultimodalInput({
});
setAttachments([]);
- }, [attachments, handleSubmit, setAttachments]);
+
+ if (width && width > 768) {
+ textareaRef.current?.focus();
+ }
+ }, [attachments, handleSubmit, setAttachments, width]);
const uploadFile = async (file: File) => {
const formData = new FormData();
@@ -242,7 +248,8 @@ export function MultimodalInput({
- {`H:${currentHigh}° L:${currentLow}°`}
+ {`H:${n(currentHigh)}° L:${n(currentLow)}°`}
@@ -296,7 +300,7 @@ export function Weather({
)}
/>
- {displayTemperatures[index]}
+ {n(displayTemperatures[index])}
{weatherAtLocation.hourly_units.temperature_2m}