Skip to content

Commit

Permalink
Merge pull request #3 from Eyevinn/fix_bug_overload
Browse files Browse the repository at this point in the history
refactor: replace custom TextArea component with NextUI's Textarea an…
  • Loading branch information
ernestocarocca authored Dec 4, 2024
2 parents e35f21d + d11be1d commit 99345d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 33 deletions.
6 changes: 3 additions & 3 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ 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('');
const [loading, setLoading] = useState(false);
const [input, setInput] = useState('');
const [error, setError] = useState('');

const handleInputChange = (event: ChangeEvent<HTMLTextAreaElement>) => {
const handleInputChange = (event: ChangeEvent<HTMLInputElement>) => {
setInput(event.target.value);
};

Expand Down Expand Up @@ -51,7 +51,7 @@ export default function Page() {
{response && <p>{response}</p>}
</CardBody>
<div className="flex bg-gray-200 flex-grow items-center p-2 overflow-scroll">
<TextArea
<Textarea
onChange={handleInputChange}
type="text"
placeholder="Type your question..."
Expand Down
30 changes: 0 additions & 30 deletions src/components/Textearea.tsx

This file was deleted.

0 comments on commit 99345d6

Please sign in to comment.