Skip to content

Commit

Permalink
feat: Added routing for pages
Browse files Browse the repository at this point in the history
  • Loading branch information
miguel-merlin committed Apr 9, 2024
1 parent 1cd85f1 commit 2e41b0a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
import { Routes, Route } from 'react-router-dom'
import HomePage from '../pages/HomePage'
import BlogPage from '../pages/BlogPage'
import ApplicationsPage from '../pages/ApplicatiosPage'
import BudgetPage from '../pages/BudgetPage'
import TeamPage from '../pages/TeamPage'

function App (): JSX.Element {
return (
<div>
<Routes>
<Route path='/' element={<HomePage />} />
<Route path='/blog' element={<BlogPage />} />
<Route path='/applications' element={<ApplicationsPage />} />
<Route path='/budget' element={<BudgetPage />} />
<Route path='/team/:teamName' element={<TeamPage />} />
</Routes>
</div>
)
Expand Down
5 changes: 4 additions & 1 deletion src/pages/TeamPage.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { useParams } from 'react-router-dom'

function TeamPage (): JSX.Element {
const { teamName } = useParams()
return (
<div>
<h1>Team</h1>
<h1>Team {teamName}</h1>
</div>
)
}
Expand Down

0 comments on commit 2e41b0a

Please sign in to comment.