Skip to content
Snippets Groups Projects
Commit 8752e6b8 authored by Adrian Orłów's avatar Adrian Orłów
Browse files

fix: add open modal login on login button click

parent eba1e664
No related branches found
No related tags found
2 merge requests!223reset the pin numbers before search results are fetch (so the results will be...,!100fix: add open modal login on login button click
Pipeline #84168 passed
...@@ -3,6 +3,7 @@ import luxembourgLogoImg from '@/assets/images/luxembourg-logo.png'; ...@@ -3,6 +3,7 @@ import luxembourgLogoImg from '@/assets/images/luxembourg-logo.png';
import { openDrawer } from '@/redux/drawer/drawer.slice'; import { openDrawer } from '@/redux/drawer/drawer.slice';
import { useAppDispatch } from '@/redux/hooks/useAppDispatch'; import { useAppDispatch } from '@/redux/hooks/useAppDispatch';
import { openLegend } from '@/redux/legend/legend.slice'; import { openLegend } from '@/redux/legend/legend.slice';
import { openLoginModal } from '@/redux/modal/modal.slice';
import { IconButton } from '@/shared/IconButton'; import { IconButton } from '@/shared/IconButton';
import Image from 'next/image'; import Image from 'next/image';
...@@ -25,6 +26,10 @@ export const NavBar = (): JSX.Element => { ...@@ -25,6 +26,10 @@ export const NavBar = (): JSX.Element => {
dispatch(openLegend()); dispatch(openLegend());
}; };
const openModalLogin = (): void => {
dispatch(openLoginModal());
};
return ( return (
<div className="flex min-h-full w-[88px] flex-col items-center justify-between bg-cultured py-8"> <div className="flex min-h-full w-[88px] flex-col items-center justify-between bg-cultured py-8">
<div data-testid="nav-buttons"> <div data-testid="nav-buttons">
...@@ -35,7 +40,7 @@ export const NavBar = (): JSX.Element => { ...@@ -35,7 +40,7 @@ export const NavBar = (): JSX.Element => {
<IconButton icon="export" onClick={openDrawerExport} /> <IconButton icon="export" onClick={openDrawerExport} />
</div> </div>
<div className="flex flex-col gap-[10px]"> <div className="flex flex-col gap-[10px]">
<IconButton icon="admin" /> <IconButton icon="admin" onClick={openModalLogin} />
<IconButton icon="legend" onClick={openDrawerLegend} /> <IconButton icon="legend" onClick={openDrawerLegend} />
</div> </div>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment