generated from mate-academy/react_people-table
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
everything works outside of parents link
- Loading branch information
1 parent
43650ea
commit 3bb75f0
Showing
5 changed files
with
371 additions
and
252 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,31 +1,47 @@ | ||
import { HashRouter, Route } from 'react-router-dom'; | ||
import { Navigate, Route, Routes } from 'react-router-dom'; | ||
|
||
import { PeoplePage } from './components/PeoplePage'; | ||
import { Navbar } from './components/Navbar'; | ||
import './App.scss'; | ||
|
||
export const App = () => { | ||
return ( | ||
<HashRouter> | ||
<div data-cy="app"> | ||
<Navbar /> | ||
<div className="section"> | ||
<div className="container"> | ||
<Route path="#/people"> | ||
<div className="block"> | ||
<div className="box table-container"> | ||
<div data-cy="app"> | ||
<Navbar /> | ||
|
||
<main className="section"> | ||
<div className="container"> | ||
<Routes> | ||
<Route path="home" element={<Navigate to="/" replace />} /> | ||
<Route | ||
path="/" | ||
element={<h1 className="title">Home Page</h1>} | ||
/> | ||
<Route path="people"> | ||
<Route | ||
index | ||
element={( | ||
<PeoplePage /> | ||
</div> | ||
</div> | ||
</Route> | ||
<Route path="/"> | ||
<h1 className="title">Home Page</h1> | ||
</Route> | ||
<Route> | ||
<h1 className="title">Page not found</h1> | ||
)} | ||
/> | ||
<Route | ||
path=":slug" | ||
element={( | ||
<PeoplePage /> | ||
)} | ||
/> | ||
</Route> | ||
</div> | ||
<Route | ||
path="*" | ||
element={( | ||
<h1 className="title"> | ||
Page not found | ||
</h1> | ||
)} | ||
/> | ||
</Routes> | ||
</div> | ||
</div> | ||
</HashRouter> | ||
</main> | ||
</div> | ||
); | ||
}; |
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.