From d11be1d9ba5ed98b59e49f92959ff022996e7ff0 Mon Sep 17 00:00:00 2001 From: ernestocarocca <113439130+ernestocarocca@users.noreply.github.com> Date: Tue, 3 Dec 2024 20:00:04 +0100 Subject: [PATCH] refactor: replace custom TextArea component with NextUI's Textarea and update input handling --- src/app/page.tsx | 6 +++--- src/components/Textearea.tsx | 30 ------------------------------ 2 files changed, 3 insertions(+), 33 deletions(-) delete mode 100644 src/components/Textearea.tsx diff --git a/src/app/page.tsx b/src/app/page.tsx index e4ada34..c35d92c 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -3,7 +3,7 @@ import { ChangeEvent, useState } from 'react'; import { Card, CardHeader, CardBody } from '@nextui-org/card'; import { Button, Spacer } from '@nextui-org/react'; import { IconArrowUp, IconTrash } from '@tabler/icons-react'; -import { TextArea } from '@/components/Textearea'; +import { Textarea } from '@nextui-org/input'; export default function Page() { const [response, setResponse] = useState(''); @@ -11,7 +11,7 @@ export default function Page() { const [input, setInput] = useState(''); const [error, setError] = useState(''); - const handleInputChange = (event: ChangeEvent) => { + const handleInputChange = (event: ChangeEvent) => { setInput(event.target.value); }; @@ -51,7 +51,7 @@ export default function Page() { {response &&

{response}

}
-