import UserContext from '@/contexts/userContext'; import { Dispatch, SetStateAction, FC, useContext } from 'react'; import { FaEllipsisH } from 'react-icons/fa'; import CommentQueryResult from '@/services/types/CommentSchema/CommentQueryResult'; import { z } from 'zod'; interface CommentCardDropdownProps { comment: z.infer; setInEditMode: Dispatch>; } const CommentCardDropdown: FC = ({ comment, setInEditMode, }) => { const { user } = useContext(UserContext); const isCommentOwner = user?.id === comment.postedBy.id; return (
  • {isCommentOwner ? ( ) : ( )}
); }; export default CommentCardDropdown;