Skip to content

Commit

Permalink
Merge pull request #7 from ivanbatchev/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
ivanbatchev authored Nov 4, 2024
2 parents e1928ad + efac62b commit 3611e7d
Showing 5 changed files with 25 additions and 8 deletions.
13 changes: 7 additions & 6 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import { BrowserRouter, Routes, Route } from 'react-router-dom'
import { Header } from './shared/components'
import { Home, About, Vans, VanDetails } from './pages'
import './App.css'
import { Layout } from './shared/components'

const App = () => {
return (
<BrowserRouter>
<Header />
<Routes>
<Route path='/' element={<Home />} />
<Route path='/about' element={<About />} />
<Route path='/vans' element={<Vans />} />
<Route path='/vans/:id' element={<VanDetails />} />
<Route element={<Layout />}>
<Route path='/' element={<Home />} />
<Route path='/about' element={<About />} />
<Route path='/vans' element={<Vans />} />
<Route path='/vans/:id' element={<VanDetails />} />
</Route>
</Routes>
</BrowserRouter>
)
4 changes: 3 additions & 1 deletion src/pages/VanDetails/styles.css
Original file line number Diff line number Diff line change
@@ -7,7 +7,9 @@
text-decoration: none;
}

.van-detail-container .back-button:visited {}
.van-detail-container .back-button:visited {
display: block;
}

.van-detail-container .back-button span {
text-decoration: underline;
11 changes: 11 additions & 0 deletions src/shared/components/Layout/Layout.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Outlet } from 'react-router-dom';
import Header from '../Header';

export const Layout = () => {
return (
<>
<Header />
<Outlet />
</>
);
};
1 change: 1 addition & 0 deletions src/shared/components/Layout/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { Layout as default } from './Layout'
4 changes: 3 additions & 1 deletion src/shared/components/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import Header from "./Header";
import Loader from "./Loader";
import VanCard from "./VanCard";
import Layout from "./Layout";

export {
Header,
Loader,
VanCard
VanCard,
Layout
}

0 comments on commit 3611e7d

Please sign in to comment.