Skip to content

Commit

Permalink
Definição das rotas de navegação
Browse files Browse the repository at this point in the history
Co-authored-by: Nathanserra <[email protected]>
Co-authored-by: hryds <[email protected]>
Co-authored-by: italovinicius18 <[email protected]>
Co-authored-by: gabrielavelino <[email protected]>
  • Loading branch information
joaovaladao committed Apr 15, 2022
1 parent 2318a63 commit 568e739
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 18 deletions.
7 changes: 4 additions & 3 deletions stag.io/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,18 @@ function App() {
<Route path="/cadastroEmpresa" element={<CadastroEmpresa/>}></Route>


<Route path="/detalhes-candidato" element={
<Route path="/detalhesCandidato" element={
//<Private>
<DetalhesCandidato/>
//</Private>
}></Route>
<Route path="/detalhes-empresa" element={
<Route path="/detalhesEmpresa" element={
//<Private>
<DetalhesEmpresa/>

//</Private>
}></Route>
<Route path="/vaga-empresa" element={
<Route path="/vagaEmpresa" element={
//<Private>
<VagaEmpresa/>
//</Private>
Expand Down
3 changes: 2 additions & 1 deletion stag.io/src/components/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ class Card extends Component {
}

render() {

return (
<div className="card-container">
<div className="card-container" onClick={() => {window.location.href = this.props.proximaPagina;}}>
<div className="left-container">
<div className="title_card">{this.props.title}</div>
<div className="company">{this.props.company}</div>
Expand Down
2 changes: 1 addition & 1 deletion stag.io/src/components/Login/login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function Popup(props){
await schema.validate(values);
toast.success("Usuário Logado!");
login(values);
window.location.pathname = '/'
//window.location.pathname = '/Vagas' Só utilizar essa linha caso não desejem fazer a autenticação
}
catch(error){
if( error instanceof Yup.ValidationError){
Expand Down
2 changes: 1 addition & 1 deletion stag.io/src/components/filtro.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class Filtro extends Component {
<div className="content-column1">
{filterDropdown.map(vaga => (
<div>
<Card tag={vaga.tags} title={vaga.vaga} company={vaga.empresa}></Card>
<Card tag={vaga.tags} title={vaga.vaga} company={vaga.empresa} proximaPagina ={"DescricaoVaga"}></Card>
</div>
))}
</div>
Expand Down
4 changes: 4 additions & 0 deletions stag.io/src/components/navBar/NavBar.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
margin-right: 20px;
}

.margin_img_logo{
margin-left: 2em;
}

.button_Nav {
font-family: 'Poppins';
font-style: normal;
Expand Down
13 changes: 9 additions & 4 deletions stag.io/src/components/navBar/NavBar.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import React, { Component } from 'react';

import './NavBar.css';
import logo from "../../logo/logo-white.png";
import perfil from "./assets/icone-perfil.png";


class Navbar extends Component {
render() {
render() {

return (
<nav className="navbar navbar-expand-lg navbar-light">
<a className="navbar-brand" href="/">
Expand All @@ -17,8 +18,12 @@ class Navbar extends Component {
<h2 className="title">Stag.io</h2>
</ul>
</div>
<button className='button_Nav'>Minhas vagas</button>
<button className='button_Nav'>Vagas</button>
<button className='button_Nav' onClick={() => {window.location.href = 'MinhasVagas';}}>Minhas vagas</button>
<button className='button_Nav' onClick={() => {window.location.href = 'Vagas';}}>Vagas</button>
<a className="navbar-brand" href="/detalhesCandidato">
<img className="img-fluid margin_img_logo"
src={perfil} width = "50" alt="perfil"/>
</a>
</nav>

);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion stag.io/src/contexts/auth.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const AuthProvider = ({children}) => {
if(value.password === "secret"){ //Senha para verificar a validação de login
console.log("Vc descobriu a senha secreta!");
setUser(loggedUser);
navigate("/cadastroCandidato"); //Mudar a página de destino quando for unir o Front-end
navigate("/Vagas");
}
};
const logout = () => {
Expand Down
2 changes: 1 addition & 1 deletion stag.io/src/pages/DetalhesEmpresa/index.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.container{
.detalhes-empresa{
position:relative;
/* margin-top: 100px; */
width: 100%;
Expand Down
11 changes: 6 additions & 5 deletions stag.io/src/pages/DetalhesEmpresa/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,23 @@ import NavBarLogo from "../../components/NavBarLogo";
import Vaga from "../../components/Vaga";


const DetalhesCandidato = (props) => {
const { values }= props;
const DetalhesEmpresa = (//props
) => {
//const { values }= props;


const getEmpresa = () => {

}
return(
<div className="container">
<div className="detalhes-empresa">
<h1 className="title-candidate"> Nome da Empresa </h1>

<div className="company">
<div className="company-desc">
<div className="description">
<div className="text-font"> Descrição </div>
<div> {values. desc} </div>
{/* <div> {values. desc} </div> */}
</div>
<div className="description">
<div className="text-font"> Localização </div>
Expand All @@ -40,4 +41,4 @@ const DetalhesCandidato = (props) => {
);
}

export default DetalhesCandidato;
export default DetalhesEmpresa;
2 changes: 1 addition & 1 deletion stag.io/src/pages/MinhasVagas/MinhasVagas.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function MinhasVagas() {
</h1>

<div className="content-column1_minhas_vagas">
<Card tag={myArray} title="Cientista de Dados" company="Empresa DadosNature"></Card>
<Card tag={myArray} title="Cientista de Dados" company="Empresa DadosNature" proximaPagina ={"SituacaoVaga"}></Card>
</div>

</div>
Expand Down

0 comments on commit 568e739

Please sign in to comment.