Skip to content

Commit

Permalink
rotas de listagem
Browse files Browse the repository at this point in the history
  • Loading branch information
yaskisoba committed Dec 13, 2023
1 parent 11cc942 commit c6b103d
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2 deletions.
5 changes: 4 additions & 1 deletion frontend/src/pages/Home/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ const Home = () => {
<Center>
<HStack marginTop='2vh'>
<Button colorScheme='facebook'>
<Link to='/recommendations'>Recomendações</Link>
<Link to='/trilhas'>Trilhas</Link>
</Button>
<Button colorScheme='facebook'>
<Link to='/eletivas'>Eletivas</Link>
</Button>
</HStack>
</Center>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/ListLearningPath/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const ListLearningPath = () => {
<Tr>
<Td textColor='#243A69'>{linha.name}</Td>
<Td textColor='#243A69'>{linha.school_year}</Td>
<Td><Icon as={ExternalLinkIcon} /></Td>
<Td><Icon as={ExternalLinkIcon}/><Link to={`/trilhas/${linha.id}`}></Link></Td>
</Tr>
))}
</Tbody>
Expand Down
18 changes: 18 additions & 0 deletions frontend/src/pages/StudentsLP/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from "react";
import { useParams } from "react-router-dom";

const DetalhesParticipantes = () => {
const { trilhaId } = useParams();

// Lógica para buscar os participantes da trilha usando o ID da trilha
// Substitua esta lógica pela lógica real de obtenção de dados do banco de dados

return (
<div>
<h1>Detalhes dos Participantes da Trilha {trilhaId}</h1>
{/* Renderize os detalhes dos participantes aqui */}
</div>
);
};

export default DetalhesParticipantes;
14 changes: 14 additions & 0 deletions frontend/src/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import SendStudent from "../pages/SendStudents";
import RegistrationPeriod from "../pages/RegistrationPeriod"
import StudentHome from "../pages/StudentHome"
import NewEnrolmentLP from "../pages/NewEnrolmentLP"
import ListLearningPath from "../pages/ListLearningPath"
import ListElectives from "../pages/ListElectives"

const RoutesApp = () => {
const { isAuthenticated, isSuperUser } = useAuth();
Expand Down Expand Up @@ -78,6 +80,18 @@ const RoutesApp = () => {
!isAuthenticated() ? <Navigate to="/signin" /> : <RegistrationPeriod />
}
/>
<Route
path="/trilhas"
element={
!isAuthenticated() ? <Navigate to="/signin" /> : <ListLearningPath />
}
/>
<Route
path="/eletivas"
element={
!isAuthenticated() ? <Navigate to="/signin" /> : <ListElectives />
}
/>
</>
) : (
<>
Expand Down

0 comments on commit c6b103d

Please sign in to comment.