bruno/renderer/components/Sidebar/MenuBar/index.js

51 lines
1.7 KiB
JavaScript
Raw Normal View History

2022-01-31 06:06:29 +01:00
import React from 'react';
2022-03-07 15:32:39 +01:00
import Link from 'next/link';
2022-03-13 22:38:57 +01:00
import { IconCode, IconStack, IconGitPullRequest, IconUser, IconUsers, IconSettings, IconBuilding, IconChevronsLeft} from '@tabler/icons';
import { useSelector, useDispatch } from 'react-redux';
import { toggleLeftMenuBar } from 'providers/ReduxStore/slices/app'
2022-01-31 06:06:29 +01:00
import StyledWrapper from './StyledWrapper';
const MenuBar = () => {
const leftMenuBarOpen = useSelector((state) => state.app.leftMenuBarOpen);
const dispatch = useDispatch();
2022-03-13 22:38:57 +01:00
2022-01-31 06:06:29 +01:00
return (
<StyledWrapper className="h-full flex flex-col">
<div className="flex flex-col">
<div className="menu-item active">
2022-03-07 15:32:39 +01:00
<Link href="/">
<IconCode size={28} strokeWidth={1.5}/>
</Link>
2022-01-31 06:06:29 +01:00
</div>
<div className="menu-item">
<IconStack size={28} strokeWidth={1.5}/>
</div>
<div className="menu-item">
<IconGitPullRequest size={28} strokeWidth={1.5}/>
</div>
<div className="menu-item">
<IconUsers size={28} strokeWidth={1.5}/>
</div>
</div>
<div className="flex flex-col flex-grow justify-end">
2022-02-03 18:55:38 +01:00
{/* Teams Icon */}
{/* <div className="menu-item">
<IconBuilding size={28} strokeWidth={1.5}/>
</div> */}
2022-01-31 06:06:29 +01:00
<div className="menu-item">
2022-03-07 15:32:39 +01:00
<Link href="/login">
<IconUser size={28} strokeWidth={1.5}/>
</Link>
2022-01-31 06:06:29 +01:00
</div>
<div className="menu-item">
<IconSettings size={28} strokeWidth={1.5}/>
</div>
<div className="menu-item" onClick={() => dispatch(toggleLeftMenuBar())}>
2022-03-13 22:38:57 +01:00
<IconChevronsLeft size={28} strokeWidth={1.5}/>
</div>
2022-01-31 06:06:29 +01:00
</div>
</StyledWrapper>
);
};
export default MenuBar;