-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat - add basic UI components and new pages
- Loading branch information
Showing
6 changed files
with
340 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,32 @@ | ||
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; | ||
import Home from './pages/Home'; | ||
import LeagueDetails from './pages/LeagueDetails'; | ||
import React from "react"; | ||
import { BrowserRouter as Router, Route, Routes } from "react-router-dom"; | ||
import Header from "./components/Header"; | ||
import Footer from "./components/Footer"; | ||
import Home from "./pages/Home"; | ||
import LeagueDetails from "./pages/LeagueDetails"; | ||
import TeamDetails from "./pages/TeamDetails"; | ||
|
||
function App() { | ||
const App: React.FC = () => { | ||
return ( | ||
<Router basename="/ui/sports-agenda/"> | ||
<Routes> | ||
<Route path="/" element={<Home />} /> | ||
<Route path="/league/:id" element={<LeagueDetails />} /> | ||
</Routes> | ||
<div style={{ display: "flex", flexDirection: "column", minHeight: "100vh" }}> | ||
Check notice on line 12 in src/App.tsx Codacy Production / Codacy Static Code Analysissrc/App.tsx#L12
|
||
{/* Header */} | ||
<Header /> | ||
|
||
{/* Main Content */} | ||
<main style={{ flex: 1 }}> | ||
<Routes> | ||
<Route path="/" element={<Home />} /> | ||
<Route path="/league/:id" element={<LeagueDetails />} /> | ||
<Route path="/team/:id" element={<TeamDetails />} /> | ||
</Routes> | ||
</main> | ||
|
||
{/* Footer */} | ||
<Footer /> | ||
</div> | ||
</Router> | ||
); | ||
} | ||
}; | ||
|
||
export default App; | ||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
|
||
const FooterContainer = styled.footer` | ||
background-color: #004d40; /* Deep Green */ | ||
color: white; | ||
padding: 10px 20px; | ||
text-align: center; | ||
font-family: Arial, sans-serif; | ||
font-size: 14px; | ||
a { | ||
color: #ffcc00; /* Yellow highlight */ | ||
text-decoration: none; | ||
font-weight: bold; | ||
transition: color 0.3s ease; | ||
&:hover { | ||
color: white; | ||
} | ||
} | ||
`; | ||
|
||
const Footer: React.FC = () => { | ||
return ( | ||
<FooterContainer> | ||
<p> | ||
© {new Date().getFullYear()} Sports Agenda - API BR. All Rights Reserved. | Built | ||
with ❤️ by <a href="https://guilhermebranco.com.br">Guilherme Branco Stracini</a> | ||
</p> | ||
</FooterContainer> | ||
); | ||
}; | ||
|
||
export default Footer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
import { Link } from "react-router-dom"; | ||
|
||
const HeaderContainer = styled.header` | ||
background-color: #004d40; /* Deep Green */ | ||
color: white; | ||
padding: 15px 20px; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
font-family: Arial, sans-serif; | ||
h1 { | ||
font-size: 24px; | ||
margin: 0; | ||
} | ||
nav { | ||
a { | ||
color: white; | ||
text-decoration: none; | ||
margin: 0 10px; | ||
font-size: 16px; | ||
font-weight: bold; | ||
transition: color 0.3s ease; | ||
&:hover { | ||
color: #ffcc00; /* Yellow highlight */ | ||
} | ||
} | ||
} | ||
`; | ||
|
||
const Header: React.FC = () => { | ||
return ( | ||
<HeaderContainer> | ||
<h1>Sports Agenda | API BR</h1> | ||
<nav> | ||
<Link to="/">Home</Link> | ||
</nav> | ||
</HeaderContainer> | ||
); | ||
}; | ||
|
||
export default Header; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.