Skip to content

Commit

Permalink
criacao homepage + routes aplicados
Browse files Browse the repository at this point in the history
  • Loading branch information
DinaX02 committed Nov 24, 2023
1 parent 81f9016 commit 9051924
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 2 deletions.
61 changes: 61 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"prettier": "^3.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.20.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
Expand Down
11 changes: 10 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
import { BrowserRouter, Routes, Route } from "react-router-dom";
import "./App.css";
import Homepage from "./pages/Homepage";
import SearchPage from "./pages/SearchPage";

function App() {
return (
<div className="App">
<h1>boas mp2</h1>
<BrowserRouter>
<Routes>
<Route path="/" element={<Homepage/>}></Route>
<Route path="/earch-page" element={<SearchPage/>}></Route>

</Routes>
</BrowserRouter>
</div>
);
}
Expand Down
Empty file added src/components/components.css
Empty file.
6 changes: 5 additions & 1 deletion src/pages/Homepage.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import React from 'react'
import { Link } from 'react-router-dom'

const Homepage = () => {
return (
<div>Homepage</div>
<div>Homepage

<Link to={"/search-page"}><button>Search your next book</button></Link>
</div>
)
}

Expand Down
9 changes: 9 additions & 0 deletions src/pages/SearchPage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react'

const SearchPage = () => {
return (
<div>SearchPage</div>
)
}

export default SearchPage

0 comments on commit 9051924

Please sign in to comment.