Skip to content
Snippets Groups Projects

feat(drawer): add drawer functionality to store

Merged mateuszmiko requested to merge feature/add_drawer_functionality_to_store into development
All threads resolved!
Files
7
@@ -2,34 +2,60 @@ import Image from 'next/image';
@@ -2,34 +2,60 @@ import Image from 'next/image';
import { IconButton } from '@/shared/IconButton';
import { IconButton } from '@/shared/IconButton';
import logoImg from '@/assets/images/logo.png';
import logoImg from '@/assets/images/logo.png';
import luxembourgLogoImg from '@/assets/images/luxembourg-logo.png';
import luxembourgLogoImg from '@/assets/images/luxembourg-logo.png';
 
import { useAppDispatch } from '@/redux/hooks/useAppDispatch';
 
import { openDrawer } from '@/redux/drawer/drawer.slice';
export const NavBar = (): JSX.Element => (
export const NavBar = (): JSX.Element => {
<div className="flex items-center justify-between flex-col w-[88px] min-h-100 bg-cultured py-8">
const dispatch = useAppDispatch();
<div data-testid="nav-buttons">
<div className="flex flex-col mb-8 gap-[10px]">
const openDrawerInfo = (): void => {
<IconButton icon="info" />
// eslint-disable-next-line prefer-template
<IconButton icon="page" />
dispatch(openDrawer('project-info'));
<IconButton icon="plugin" />
};
<IconButton icon="export" />
</div>
const openDrawerPlugins = (): void => {
<div className="flex flex-col gap-[10px]">
// eslint-disable-next-line prefer-template
<IconButton icon="admin" />
dispatch(openDrawer('plugins'));
<IconButton icon="legend" />
};
 
 
const openDrawerExport = (): void => {
 
// eslint-disable-next-line prefer-template
 
dispatch(openDrawer('export'));
 
};
 
 
const openDrawerLegend = (): void => {
 
// eslint-disable-next-line prefer-template
 
dispatch(openDrawer('legend'));
 
};
 
 
return (
 
<div className="flex items-center justify-between flex-col w-[88px] min-h-100 bg-cultured py-8">
 
<div data-testid="nav-buttons">
 
<div className="flex flex-col mb-8 gap-[10px]">
 
<IconButton icon="info" onClick={openDrawerInfo} />
 
<IconButton icon="page" />
 
<IconButton icon="plugin" onClick={openDrawerPlugins} />
 
<IconButton icon="export" onClick={openDrawerExport} />
 
</div>
 
<div className="flex flex-col gap-[10px]">
 
<IconButton icon="admin" />
 
<IconButton icon="legend" onClick={openDrawerLegend} />
 
</div>
</div>
</div>
</div>
<div className="flex flex-col items-center gap-[20px]" data-testid="nav-logos-and-powered-by">
<div className="flex flex-col items-center gap-[20px]" data-testid="nav-logos-and-powered-by">
<Image
<Image
className="bg-white-pearl rounded-s rounded-m pb-[7px]"
className="bg-white-pearl rounded-s rounded-m pb-[7px]"
src={luxembourgLogoImg}
src={luxembourgLogoImg}
alt="luxembourg logo"
alt="luxembourg logo"
height={41}
height={41}
width={48}
width={48}
/>
/>
<Image src={logoImg} alt="logo" height={48} width={48} />
<Image src={logoImg} alt="logo" height={48} width={48} />
<span className="w-14 h-16 text-[8px] leading-4 text-center">
<span className="w-14 h-16 text-[8px] leading-4 text-center">
Powered by: MINERVA Platform (v16.0.8)
Powered by: MINERVA Platform (v16.0.8)
</span>
</span>
 
</div>
</div>
</div>
</div>
);
);
};
Loading