diff --git a/frontend/src/icon/menuHamburguer.png b/frontend/src/icon/menuHamburguer.png
new file mode 100644
index 00000000..cef58d9b
Binary files /dev/null and b/frontend/src/icon/menuHamburguer.png differ
diff --git a/frontend/src/img/cmtnLogo.png b/frontend/src/img/cmtnLogo.png
new file mode 100644
index 00000000..22b4c4b0
Binary files /dev/null and b/frontend/src/img/cmtnLogo.png differ
diff --git a/frontend/src/pages/Home/index.js b/frontend/src/pages/Home/index.js
index 0788734c..54482ae1 100644
--- a/frontend/src/pages/Home/index.js
+++ b/frontend/src/pages/Home/index.js
@@ -1,21 +1,48 @@
import React from "react";
-import { useNavigate } from "react-router-dom";
-import Button from "../../components/Button";
-import useAuth from "../../hooks/useAuth";
-import * as C from "./styles";
-
-const Home = () => {
- const { signout } = useAuth();
- const navigate = useNavigate();
+import { Link } from "react-router-dom";
+import { Flex, Box, Heading, Spacer, Text, Center, Menu, MenuButton, MenuList, MenuItem, Button} from "@chakra-ui/react"; // Importe os componentes do Chakra UI ou outro framework que você esteja usando
+import { Image } from '@chakra-ui/react'
+import cmtnLogo from '../../img/cmtnLogo.png'
+import menuHamburguer from '../../icon/menuHamburguer.png'
+const Header = () => {
return (
-
- Home
-
-
+
+
+
+
+
+
+
+
+
+
+ Home
+
+
+
+
+
);
};
-export default Home;
+export default Header;
diff --git a/frontend/src/pages/Signin/index.js b/frontend/src/pages/Signin/index.js
index 775b91cf..08f3ac73 100644
--- a/frontend/src/pages/Signin/index.js
+++ b/frontend/src/pages/Signin/index.js
@@ -8,7 +8,8 @@ import { Image } from '@chakra-ui/react'
import * as C from "./styles";
import Input from "../../components/Input";
import Button from "../../components/Button";
-import { Text } from '@chakra-ui/react'
+import { Text } from '@chakra-ui/react';
+import axios from 'axios';
const Signin = () => {
const { signin } = useAuth();
@@ -23,31 +24,29 @@ const Signin = () => {
setError("Preencha todos os campos");
return;
}
-
+ console.log(email);
+ console.log(senha);
try {
- const response = await fetch('sua-url-de-autenticacao', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify({ email, senha }),
- });
-
- const data = await response.json();
-
- if (response.ok) {
+ const response = await axios.post('localhost:3000', { email, senha });
+
+ if (response.status === 200) {
// Sucesso, redirecionar ou realizar outras ações necessárias
navigate("/home");
} else {
// Exibir mensagem de erro
- setError(data.message);
+ setError(response.data.message);
}
} catch (error) {
- console.error("Erro ao fazer login:", error);
+ if (axios.isAxiosError(error)) {
+ // Imprime informações detalhadas sobre o erro Axios
+ console.error("Erro ao fazer login - Status:", error.response?.status);
+ console.error("Erro ao fazer login - Data:", error.response?.data);
+ } else {
+ console.error("Erro ao fazer login:", error);
+ }
setError("Erro ao fazer login. Tente novamente mais tarde.");
}
};
-
return (
@@ -79,7 +78,7 @@ const Signin = () => {
-
+
diff --git a/frontend/src/routes/index.js b/frontend/src/routes/index.js
index b6b32480..7a4b9d77 100644
--- a/frontend/src/routes/index.js
+++ b/frontend/src/routes/index.js
@@ -16,7 +16,7 @@ const RoutesApp = () => {
- } />
+ } />
} />
} />
} />