Skip to content

Commit 9bc1b07

Browse files
committed
made changes to navbar component and App
1 parent 7eb409f commit 9bc1b07

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

tutorial/src/App.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1+
import React from 'react';
2+
import Navbar from './components/Navbar';
3+
import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
4+
15
import './App.css';
26

37
function App() {
48
return (
5-
<div className="App">
6-
<h1>Hello World</h1>
7-
</div>
9+
<>
10+
<Router>
11+
<Navbar />
12+
<Routes>
13+
<Route path='/' />
14+
</Routes>
15+
</Router>
16+
</>
817
);
918
}
1019

tutorial/src/components/Navbar.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import React, {useState} from 'react'
2+
import { Link } from 'react-router-dom'
23

34
function Navbar() {
45
return (
56
<>
67
<nav className="navbar">
78
<div className="navbar-container">
8-
9+
<Link to="/" className="navbar-logo">
10+
TRVL <i className="fab fa-typo3"></i>
11+
</Link>
912
</div>
1013
</nav>
1114
</>

0 commit comments

Comments
 (0)