Feat/open comment drawer from comment chip (#187)
* wip * Can open comment right drawer from company name cell
This commit is contained in:
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user