diff --git a/frontend/src/App.js b/frontend/src/App.js
index 5054036e..e47c615a 100644
--- a/frontend/src/App.js
+++ b/frontend/src/App.js
@@ -6,7 +6,7 @@ import GlobalStyle from "./styles/global";
const App = () => (
-
+ {/* */}
);
diff --git a/frontend/src/contexts/auth.js b/frontend/src/contexts/auth.js
index 6f6dafd5..27f57317 100644
--- a/frontend/src/contexts/auth.js
+++ b/frontend/src/contexts/auth.js
@@ -27,6 +27,7 @@ export const AuthProvider = ({ children }) => {
const isSuperUser = () => {
const userType = sessionStorage.getItem("superuser");
+ console.log(userType)
return userType
}
diff --git a/frontend/src/pages/Home/index.js b/frontend/src/pages/Home/index.js
index 880825d4..661b3b03 100644
--- a/frontend/src/pages/Home/index.js
+++ b/frontend/src/pages/Home/index.js
@@ -1,9 +1,9 @@
import React from "react";
-import { Container, Flex, Stack, Box, Wrap, WrapItem, Button, Center } from "@chakra-ui/react";
+import { Container, Flex, Text, HStack, Wrap, WrapItem, Button, Center } 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 * as C from "./styles";
import { Link } from "react-router-dom";
const Home = () => {
@@ -11,25 +11,47 @@ const Home = () => {
-
+
+
+
+
+ Bem vindo, administrador!
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/pages/Home/styles.js b/frontend/src/pages/Home/styles.js
index 117b5526..788a8e68 100644
--- a/frontend/src/pages/Home/styles.js
+++ b/frontend/src/pages/Home/styles.js
@@ -1,4 +1,5 @@
import { chakra, MenuList, MenuItem, Image, Container } from '@chakra-ui/react';
+import styled from "styled-components";
export const StyledMenuList = chakra(MenuList, {
baseStyle: {
@@ -8,6 +9,15 @@ export const StyledMenuList = chakra(MenuList, {
},
});
+export const titulo = styled.div`
+ font-size: 150%;
+ font-weight: 600;
+ color: #243A69;
+ margin-left: 20px;
+ margin-top: 20px;
+ align: center;
+`;
+
// export const StyledContainer = chakra( Container, {
// baseStyle: {
// gap:'15vh',
diff --git a/frontend/src/pages/Signin/index.js b/frontend/src/pages/Signin/index.js
index fc3379df..ddf8aca0 100644
--- a/frontend/src/pages/Signin/index.js
+++ b/frontend/src/pages/Signin/index.js
@@ -31,11 +31,15 @@ const Signin = () => {
sessionStorage.setItem("superuser", response.data.superuser);
signin();
- console.log("oi")
- console.log( sessionStorage.getItem("superuser"))
- console.log(isSuperUser())
- navigate("/home");
+ let typeUser = isSuperUser()
+ if(typeUser == "true"){
+ console.log("é adm ")
+ navigate("/home");
+ } else {
+ console.log("é aluno ")
+ navigate('/home')
+ }
} else {
setError("Credenciais inválidas");
diff --git a/frontend/src/pages/StudentHome/index.js b/frontend/src/pages/StudentHome/index.js
new file mode 100644
index 00000000..2f08c6e7
--- /dev/null
+++ b/frontend/src/pages/StudentHome/index.js
@@ -0,0 +1,51 @@
+import React from "react";
+import { Container, Flex, Text, HStack, Wrap, WrapItem, Button, Center } 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 * as C from "./styles";
+
+
+import { Link } from "react-router-dom";
+
+const StudentHome = () => {
+ return (
+
+
+
+
+
+
+
+ Bem vindo, estudante!
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+export default StudentHome;
diff --git a/frontend/src/pages/StudentHome/styles.js b/frontend/src/pages/StudentHome/styles.js
new file mode 100644
index 00000000..b7a9cba7
--- /dev/null
+++ b/frontend/src/pages/StudentHome/styles.js
@@ -0,0 +1,10 @@
+import styled from "styled-components";
+
+export const titulo = styled.div`
+ font-size: 150%;
+ font-weight: 600;
+ color: #243A69;
+ margin-left: 20px;
+ margin-top: 20px;
+ align: center;
+`;
\ No newline at end of file
diff --git a/frontend/src/routes/index.js b/frontend/src/routes/index.js
index e188b050..9a9febe9 100644
--- a/frontend/src/routes/index.js
+++ b/frontend/src/routes/index.js
@@ -1,5 +1,5 @@
-import { Navigate, Route, BrowserRouter, Routes } from "react-router-dom";
import React from "react";
+import { Navigate, Route, BrowserRouter, Routes } from "react-router-dom";
import useAuth from "../hooks/useAuth";
import Home from "../pages/Home";
import Signin from "../pages/Signin";
@@ -11,14 +11,14 @@ import ExclusionTrilhas from "../pages/ExclusionTrilhas";
import Recommendations from "../pages/Recommendations";
import SendStudent from "../pages/SendStudents";
import RegistrationPeriod from "../pages/RegistrationPeriod"
-import ChoiceList from "../pages/ChoiceList"
-import ListElectives from "../pages/ListElectives"
-import ListLearningPath from "../pages/ListLearningPath"
+import StudentHome from "../pages/StudentHome"
const RoutesApp = () => {
const { isAuthenticated, isSuperUser } = useAuth();
+ let typeUser = isSuperUser()
+ console.log('type:', typeUser == 'true')
+
- isSuperUser()
return (
@@ -27,7 +27,7 @@ const RoutesApp = () => {
} />
} />
- {isSuperUser() ? (
+ {typeUser == 'true' ? (
<>
{
}
/>
:
}
@@ -77,30 +77,12 @@ const RoutesApp = () => {
!isAuthenticated() ? :
}
/>
- :
- }
- />
- :
- }
- />
- :
- }
- />
>
) : (
:
+ !isAuthenticated() ? :
}
/>
)}