Skip to content

Commit

Permalink
fix path
Browse files Browse the repository at this point in the history
  • Loading branch information
tphamcs committed Aug 5, 2024
1 parent 521635d commit 6d89ba5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
7 changes: 1 addition & 6 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
import './App.scss';
import 'bootstrap/dist/css/bootstrap.min.css';
import { Routes , Route } from 'react-router-dom';
import Header from './components/Navbar';
import Home from './pages/Home';
import Contact from './pages/Contact';

function App() {

return (
<div className="App">
<Header></Header>
<Routes>
<Route path={'/'} element={<Home/>} />
<Route path={'/contact'} element={<Contact/>} />
</Routes>
<Home></Home>
</div>
);
}
Expand Down
5 changes: 2 additions & 3 deletions src/components/Navbar/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Container from 'react-bootstrap/Container';
import Nav from 'react-bootstrap/Nav';
import Navbar from 'react-bootstrap/Navbar';
import { Link } from "react-router-dom"

const Header = () => {

Expand All @@ -11,8 +10,8 @@ const Header = () => {
<Container>
<Navbar.Brand href={'/'}>React Boostrap</Navbar.Brand>
<Nav className="me-auto">
<Link style={{marginRight: "1em"}} to={'/'}>Home</Link>
<Link to={'/contact'}>Contact</Link>
<Nav.Link to={''}>Home</Nav.Link>
<Nav.Link to={''}>Contact</Nav.Link>
</Nav>
</Container>
</Navbar>
Expand Down
9 changes: 3 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@ import ReactDOM from 'react-dom/client';
import './index.scss';
import App from './App';
import reportWebVitals from './reportWebVitals';
import { HashRouter } from "react-router-dom"
import CoinListProvider from './context/CoinListContext';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<HashRouter>
<CoinListProvider>
<App />
</CoinListProvider>
</HashRouter>
<CoinListProvider>
<App />
</CoinListProvider>
</React.StrictMode>
);

Expand Down

0 comments on commit 6d89ba5

Please sign in to comment.