Skip to content
Snippets Groups Projects

Resolve "[MIN-320] opening project without permission"

Merged Piotr Gawron requested to merge 253-min-320-opening-project-without-permission into development
25 files
+ 336
14
Compare changes
  • Side-by-side
  • Inline
Files
25
@@ -3,7 +3,7 @@ import { contextMenuSelector } from '@/redux/contextMenu/contextMenu.selector';
import { closeContextMenu } from '@/redux/contextMenu/contextMenu.slice';
import { useAppDispatch } from '@/redux/hooks/useAppDispatch';
import { useAppSelector } from '@/redux/hooks/useAppSelector';
import { openMolArtModalById } from '@/redux/modal/modal.slice';
import { openAddCommentModal, openMolArtModalById } from '@/redux/modal/modal.slice';
import React from 'react';
import { twMerge } from 'tailwind-merge';
@@ -27,6 +27,11 @@ export const ContextMenu = (): React.ReactNode => {
}
};
const handleAddCommentClick = (): void => {
dispatch(closeContextMenu());
dispatch(openAddCommentModal());
};
return (
<div
className={twMerge(
@@ -50,6 +55,15 @@ export const ContextMenu = (): React.ReactNode => {
>
Open MolArt ({getUnitProtId()})
</button>
<hr />
<button
className={twMerge('cursor-pointer text-xs font-normal')}
onClick={handleAddCommentClick}
type="button"
data-testid="add-comment"
>
Add comment
</button>
</div>
);
};
Loading