Skip to content

Commit

Permalink
corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasgabriel18 committed Jun 17, 2024
1 parent 681a47b commit 26b7f58
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/components/chatbot/chatbot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ const ChatBot: React.FC = () => {
const sendAPIKeyMessage = () => {
setChatHistory(prevHistory => [
...prevHistory,
{ text: "Olá! Eu sou o (LinguiTalk ou LinguaBot). Coloca a sua chave:", origin: 'bot' }
{ text: "Olá! Eu sou o LinguiTalk, um chatbot para lhe auxiliar na exploração dos seus dados! Primeiro, insira uma chave API válida do ChatGPT:", origin: 'bot' }
]);
};

const sendInitialMessage = () => {
setChatHistory(prevHistory => [
...prevHistory,
{ text: "Olá! Eu sou o (LinguiTalk ou LinguaBot). Como posso ajudar?", origin: 'bot' }
{ text: "Olá! Eu sou o LinguiTalk. Como posso ajudar?", origin: 'bot' }
]);
};

Expand Down Expand Up @@ -98,7 +98,7 @@ const ChatBot: React.FC = () => {
{isOpen && (
<div className="fixed bottom-20 right-4 bg-white border border-gray-300 shadow-lg rounded-lg w-80 flex flex-col max-h-[600px]">
<div className="bg-blue-500 text-white p-4 flex justify-between items-center">
<h2 className="text-lg">LinguiTalk ou LinguaBot</h2>
<h2 className="text-lg">LinguiTalk</h2>
<button
className="text-white hover:text-gray-200"
onClick={toggleChat}
Expand Down
8 changes: 3 additions & 5 deletions src/components/selectFileCard/selectFileCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Papa from "papaparse";
import CsvTable from "../csvTable/csvTable";
import { Button } from "@mui/material";

interface Props {
interface props {
selectedFile: File | null;
setSelectedFile: (file: File | null) => void;
setData: (data: any[][]) => void;
Expand All @@ -22,7 +22,7 @@ export default function SelectFileCard({
data,
header,
setHeader,
}: Props) {
}: props) {
const [isDragging, setIsDragging] = useState<boolean>(false);
const [currentPage, setCurrentPage] = useState<number>(0);

Expand Down Expand Up @@ -56,15 +56,13 @@ export default function SelectFileCard({
}
};

// Handle file drop
const handleDrop = (event: React.DragEvent<HTMLDivElement>) => {
setIsDragging(false);
event.preventDefault();

const file = event.dataTransfer.files[0];
if (file && file.name.endsWith(".csv")) {
setSelectedFile(file);
parseCSV(file);
} else {
setSelectedFile(null);
}
Expand Down Expand Up @@ -216,4 +214,4 @@ export default function SelectFileCard({
)}
</div>
);
}
}

0 comments on commit 26b7f58

Please sign in to comment.