diff --git a/frontend/src/pages/CreateEletivas/index.js b/frontend/src/pages/CreateEletivas/index.js
index 61bfd4c9..1a8aa889 100644
--- a/frontend/src/pages/CreateEletivas/index.js
+++ b/frontend/src/pages/CreateEletivas/index.js
@@ -240,8 +240,6 @@ const CreateEletivas = () => {
-
-
@@ -250,7 +248,6 @@ const CreateEletivas = () => {
-
);
};
diff --git a/frontend/src/pages/SendStudents/index.js b/frontend/src/pages/SendStudents/index.js
index 81dd1782..a3085dd6 100644
--- a/frontend/src/pages/SendStudents/index.js
+++ b/frontend/src/pages/SendStudents/index.js
@@ -1,31 +1,45 @@
import React, { useState } from 'react';
import axios from 'axios';
-import { Container, Flex, Box, Text, Button, Input, Center } from "@chakra-ui/react";
+import { Container, Flex, Box, Text, Button, Input, Center, useToast } from "@chakra-ui/react";
import Header from "../../components/Header/index.js";
import Footer from "../../components/Footer/index.js";
import { ChakraProvider } from "@chakra-ui/react";
import { Link } from "react-router-dom";
const SendStudent = () => {
-
- const [selectedFile, setSelectedFile] = useState(null);
+ const [selectedFile, setSelectedFile] = useState(null);
+ const toast = useToast();
- const handleFileChange = (event) => {
- setSelectedFile(event.target.files[0]);
- }
+ const handleFileChange = (event) => {
+ setSelectedFile(event.target.files[0]);
+ }
- const handleUpload = () => {
- const formData = new FormData();
- formData.append('arquivo', selectedFile);
+ const handleUpload = () => {
+ const formData = new FormData();
+ formData.append('arquivo', selectedFile);
- axios.post('http://localhost:3001/send-file/extract-students', formData)
- .then(response => {
- console.log('Resposta do servidor:', response.data);
- })
- .catch(error => {
- console.error('Erro ao enviar arquivo:', error);
- })
- }
+ axios.post('http://localhost:3001/send-file/extract-students', formData)
+ .then(response => {
+ console.log('Resposta do servidor:', response.data);
+ // Exibir Toast de confirmação
+ toast({
+ title: "Arquivo enviado com sucesso!",
+ status: "success",
+ duration: 3000,
+ isClosable: true,
+ });
+ })
+ .catch(error => {
+ console.error('Erro ao enviar arquivo:', error);
+ // Exibir Toast de erro, se necessário
+ toast({
+ title: "Erro ao enviar arquivo",
+ status: "error",
+ duration: 3000,
+ isClosable: true,
+ });
+ })
+ }
return (
@@ -33,49 +47,49 @@ const SendStudent = () => {
-
-
- Importar dados
-
-
-
-
-
+
diff --git a/frontend/src/styles/global.js b/frontend/src/styles/global.js
index 65f1ae42..15c27d3d 100644
--- a/frontend/src/styles/global.js
+++ b/frontend/src/styles/global.js
@@ -6,7 +6,7 @@ const GlobalStyle = createGlobalStyle`
margin: 0;
padding: 0;
box-sizing: border-box;
- border: 1px solid hotpink;
+ //border: 1px solid hotpink;
}
body {