Skip to content

Commit c71b2e3

Browse files
committed
feat: add the Sidebar Modal project to the home app
1 parent a62e478 commit c71b2e3

File tree

4 files changed

+19
-11
lines changed

4 files changed

+19
-11
lines changed

src/App.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Menu from './projects/5.Menu'
99
import Tabs from './projects/6.Tabs'
1010
import Slider from './projects/7.Slider'
1111
import Navbar from './projects/8.Navbar'
12-
// import SidebarModal from './projects/9.Sidebar-Modal'
12+
import SidebarModal from './projects/9.Sidebar-Modal'
1313
// import StripeMenu from './projects/10.StripeMenu'
1414
// import Cart from './projects/11.Cart'
1515
// import CartUseReducer from './projects/12.CartUseReducer'
@@ -28,8 +28,8 @@ function App() {
2828
<Route path="/tabs" component={Tabs}/>
2929
<Route path="/slider" component={Slider}/>
3030
<Route path="/navbar" component={Navbar}/>
31-
{/* <Route path="/sidebar-modal" component={SidebarModal}/>
32-
<Route path="/stripe-menu" component={StripeMenu}/>
31+
<Route path="/sidebar-modal" component={SidebarModal}/>
32+
{/* <Route path="/stripe-menu" component={StripeMenu}/>
3333
<Route path="/cart" component={Cart}/>
3434
<Route path="/cart-use-reducer" component={CartUseReducer}/> */}
3535
</Switch>

src/data.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ const projects = [
3939
image: './images/projects_thumb/Navbar.png',
4040
link: '/navbar'
4141
},
42+
{
43+
title: 'Sidebar Modal',
44+
image: './images/projects_thumb/SidebarModal.png',
45+
link: '/sidebar-modal'
46+
},
4247

4348
];
4449
export default projects;

src/projects/9.Sidebar-Modal/index.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
import Modal from './Modal'
22
import Sidebar from './Sidebar'
33
import Home from './Home'
4-
import './index.css'
4+
import './index.scss'
55
import { AppProvider } from './context';
66
function Index() {
77
return (
8-
<AppProvider>
9-
<Home />
10-
<Modal />
11-
<Sidebar />
12-
</AppProvider>
8+
<div className="sidebar-modal">
9+
<AppProvider>
10+
<Home />
11+
<Modal />
12+
<Sidebar />
13+
</AppProvider>
14+
</div>
1315
)
1416
}
1517

src/projects/9.Sidebar-Modal/index.css renamed to src/projects/9.Sidebar-Modal/index.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Variables
4949
Global Styles
5050
===============
5151
*/
52-
52+
.sidebar-modal{
5353
*,
5454
::after,
5555
::before {
@@ -325,4 +325,5 @@ Variables
325325
.sidebar {
326326
width: 400px;
327327
}
328-
}
328+
}
329+
}

0 commit comments

Comments
 (0)