Last active
May 20, 2022 06:30
-
-
Save EliasSalom/49446f73f77c74bf2e0b2c1b995e21c7 to your computer and use it in GitHub Desktop.
React-Router
This file contains hidden or 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
| const Menu: React.FC = () => { | |
| return ( | |
| <Router> | |
| <nav> | |
| <ul className='Menu-navbar'> | |
| <div className='Menu-Logo-place'> | |
| <Link to="/"><img className='Menu-logo-image' src={Menu_logo} alt="lt" /></Link> | |
| </div> | |
| <div className='Menu-list-place'> | |
| <Link to="/">Home</Link> | |
| <Link to="about">About</Link> | |
| <Link to="contact">Contact Us</Link> | |
| <li>flags for langage</li> | |
| </div> | |
| </ul> | |
| </nav> | |
| <Routes> | |
| <Route path="/" caseSensitive={false} element={<Home />} /> | |
| <Route path="/about" caseSensitive={false} element={<AboutUs />} /> | |
| <Route path="/contact" caseSensitive={false} element={<ContactUs />} /> | |
| </Routes> | |
| </Router> | |
| ) | |
| } | |
| export default Menu; | |
| // Don't forget the to import <Outlet/> in the same file that you want to show the pages |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment