Skip to content

Commit

Permalink
fix path
Browse files Browse the repository at this point in the history
  • Loading branch information
tphamcs committed Aug 3, 2024
1 parent 34f5627 commit 9266341
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import Home from './pages/Home';
import Contact from './pages/Contact';

function App() {
const basePath = '/react-cgecko-api'
const basePath = 'react-cgecko-api'

return (
<div className="App">
<Header></Header>
<Routes>
<Route path={`${basePath}/`} element={<Home/>} />
<Route path={`${basePath}/contact`} element={<Contact/>} />
<Route path={`/${basePath}/`} element={<Home/>} />
<Route path={`/${basePath}/contact`} element={<Contact/>} />
</Routes>
</div>
);
Expand Down
8 changes: 4 additions & 4 deletions src/components/Navbar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ import Nav from 'react-bootstrap/Nav';
import Navbar from 'react-bootstrap/Navbar';

const Header = () => {
const basePath = '/react-cgecko-api'
const basePath = 'react-cgecko-api'

return (
<>
<Navbar bg="primary" data-bs-theme="dark">
<Container>
<Navbar.Brand href={`${basePath}/`}>React Boostrap</Navbar.Brand>
<Navbar.Brand href={`/${basePath}/`}>React Boostrap</Navbar.Brand>
<Nav className="me-auto">
<Nav.Link href={`${basePath}/`}>Home</Nav.Link>
<Nav.Link href={`${basePath}/contact`}>Contact</Nav.Link>
<Nav.Link href={`/${basePath}/`}>Home</Nav.Link>
<Nav.Link href={`/${basePath}/contact`}>Contact</Nav.Link>
</Nav>
</Container>
</Navbar>
Expand Down

0 comments on commit 9266341

Please sign in to comment.