Skip to content

Commit

Permalink
caminho tela inicial para cadastro adicionado #37
Browse files Browse the repository at this point in the history
  • Loading branch information
biancabsouza23 committed May 28, 2024
1 parent 5e70bdc commit a1bb1e9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
16 changes: 10 additions & 6 deletions Fronted/src/App.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import React from "react";
import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
import "./componentes/normalize.css";
import PaginaInicial from "./componentes/inicial"; // Importe o componente com a primeira letra maiúscula
import EditPerfil from "./componentes/EditPerfil";
import { BrowserRouter as Router, Route, Routes } from "react-router-dom";
import PaginaInicial from "./componentes/inicial";
import FormularioCadastro from "./componentes/FormularioCadastro";
import MeuPerfil from "./componentes/MeuPerfil";

function App() {
return <MeuPerfil />;
return (
<Router>
<Routes>
<Route path="/" element={<PaginaInicial />} />
<Route path="/cadastro" element={<FormularioCadastro />} />
</Routes>
</Router>
);
}

export default App;
26 changes: 14 additions & 12 deletions Fronted/src/componentes/inicial.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import React from "react";
import { useNavigate } from "react-router-dom";
import "./normalize.css";
import "./inicial.css";
import logo from "../img/Lelove.png";

function Inicial() {
// Renomeie a função para começar com letra maiúscula
const navigate = useNavigate();

// const handleButtonClick = () => {
// // Função para manipular o clique no botão
// window.open({FormularioCadastro}, "_blank"); // Abre o link em uma nova aba
// };
const handleCreateAccountClick = () => {
navigate("/cadastro");
};

return (
<body>
<div>
<header>
<nav>
<div class="Logo">
<div className="Logo">
<figure>
<img src={logo} alt="Logo da Lelove" width="75" />
</figure>
</div>
<button class="buttons">Entrar</button>
<button className="buttons">Entrar</button>
</nav>
</header>

Expand All @@ -29,8 +29,10 @@ function Inicial() {
<div>
<div>
<h1>Deslize para a direita</h1>
<div class="buttons">
<button id="criar">Criar uma conta</button>
<div className="buttons">
<button id="criar" onClick={handleCreateAccountClick}>
Criar uma conta
</button>
</div>
</div>
</div>
Expand All @@ -40,8 +42,8 @@ function Inicial() {
<footer>
<p>todos os modelos são do CANVA</p>
</footer>
</body>
</div>
);
}

export default Inicial; // Exporte o componente com a primeira letra maiúscula
export default Inicial;

0 comments on commit a1bb1e9

Please sign in to comment.