17 lines
589 B
JavaScript
17 lines
589 B
JavaScript
import { useLocation } from 'react-router-dom'
|
|
import DashboardSidebar from '../common/DashboardSidebar'
|
|
import { getSidebarItems, getSidebarSelectedKey } from '../../../database/Sidebars'
|
|
|
|
const FinanceSidebar = (props) => {
|
|
const location = useLocation()
|
|
const includeDev = import.meta.env.MODE === 'development'
|
|
const items = getSidebarItems('finance', { includeDev })
|
|
const selectedKey = getSidebarSelectedKey('finance', location.pathname, {
|
|
includeDev
|
|
})
|
|
|
|
return <DashboardSidebar items={items} selectedKey={selectedKey} {...props} />
|
|
}
|
|
|
|
export default FinanceSidebar
|