[WIKI-509] feat: comment copy link option (#7385)
* feat: comment copy link option * chore: add translations * chore: update block position * chore: rename use id scroll hook * refactor: setTimeout function * refactor: use-hash-scroll hook
This commit is contained in:
parent
f90e553881
commit
2c70c1aaa8
31 changed files with 694 additions and 250 deletions
|
|
@ -6,7 +6,6 @@ import { TIssueComment } from "@plane/types";
|
|||
import { Avatar, Tooltip } from "@plane/ui";
|
||||
import { calculateTimeAgo, cn, getFileURL, renderFormattedDate, renderFormattedTime } from "@plane/utils";
|
||||
// hooks
|
||||
//
|
||||
import { useMember } from "@/hooks/store";
|
||||
|
||||
type TCommentBlock = {
|
||||
|
|
@ -18,13 +17,17 @@ type TCommentBlock = {
|
|||
|
||||
export const CommentBlock: FC<TCommentBlock> = observer((props) => {
|
||||
const { comment, ends, quickActions, children } = props;
|
||||
// refs
|
||||
const commentBlockRef = useRef<HTMLDivElement>(null);
|
||||
// store hooks
|
||||
const { getUserDetails } = useMember();
|
||||
const { t } = useTranslation();
|
||||
// derived values
|
||||
const userDetails = getUserDetails(comment?.actor);
|
||||
// translation
|
||||
const { t } = useTranslation();
|
||||
|
||||
if (!comment || !userDetails) return null;
|
||||
|
||||
if (!comment || !userDetails) return <></>;
|
||||
return (
|
||||
<div
|
||||
className={`relative flex gap-3 ${ends === "top" ? `pb-2` : ends === "bottom" ? `pt-2` : `py-2`}`}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue