Feat/open comment drawer from comment chip (#187)

* wip

* Can open comment right drawer from company name cell
This commit is contained in:
Lucas Bordeau
2023-06-02 17:51:17 +02:00
committed by GitHub
parent 69c1095055
commit a2fe159c2c
15 changed files with 154 additions and 34 deletions

View File

@ -1,9 +1,13 @@
import { useRecoilState } from 'recoil';
import { RightDrawerBody } from '../../layout/right-drawer/RightDrawerBody';
import { RightDrawerPage } from '../../layout/right-drawer/RightDrawerPage';
import { RightDrawerTopBar } from '../../layout/right-drawer/RightDrawerTopBar';
import { CommentTextInput } from './CommentTextInput';
import { commentableEntityArrayState } from '../../modules/comments/states/commentableEntityArrayState';
export function RightDrawerComments() {
const [commentableEntityArray] = useRecoilState(commentableEntityArrayState);
function handleSendComment(text: string) {
console.log(text);
}
@ -12,6 +16,11 @@ export function RightDrawerComments() {
<RightDrawerPage>
<RightDrawerTopBar title="Comments" />
<RightDrawerBody>
{commentableEntityArray.map((commentableEntity) => (
<div key={commentableEntity.id}>
{commentableEntity.type} - {commentableEntity.id}
</div>
))}
<CommentTextInput onSend={handleSendComment} />
</RightDrawerBody>
</RightDrawerPage>