mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
Migrate from Vue to React framework.
This commit is contained in:
9
client/src/components/Sideabr/SidebarContainer.js
Normal file
9
client/src/components/Sideabr/SidebarContainer.js
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
export default function() {
|
||||
return (
|
||||
<div class="sidebar" id="sidebar">
|
||||
|
||||
</div>
|
||||
)
|
||||
};
|
||||
19
client/src/components/Sideabr/SidebarHead.js
Normal file
19
client/src/components/Sideabr/SidebarHead.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import React from 'react';
|
||||
|
||||
export default function() {
|
||||
return (
|
||||
<div class="sidebar__head">
|
||||
<div class="sidebar__head-logo">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sidebar__head-company-meta">
|
||||
<span class="comapny-name">
|
||||
|
||||
</span>
|
||||
|
||||
<span class="company-meta"></span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
30
client/src/components/Sideabr/index.js
Normal file
30
client/src/components/Sideabr/index.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import React from 'react';
|
||||
import {
|
||||
BrowserRouter as Router,
|
||||
Switch,
|
||||
Route,
|
||||
} from 'react-router-dom';
|
||||
import SidebarContainer from './SidebarContainer';
|
||||
import SidebarHead from './SidebarHead';
|
||||
import sidebarRoutes from '../../routes/sidebar';
|
||||
|
||||
export default function Sidebar() {
|
||||
return (
|
||||
<SidebarContainer>
|
||||
<SidebarHead />
|
||||
|
||||
<div className="sidebar__menu">
|
||||
<Menu>
|
||||
{ sidebarRoutes.map((route, index) => (
|
||||
<Route
|
||||
key={index}
|
||||
path={route.path}
|
||||
exact={route.exact}
|
||||
children={<route.sidebar />}
|
||||
/>
|
||||
))}
|
||||
</Menu>
|
||||
</div>
|
||||
</SidebarContainer>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user