import React, { useState } from "react"; import { getAvatarColor } from "../../../../modules/collaboration/functions/getAvatarColor"; import { getUserData } from "../../../../functions/getUserData"; import { getRelativeTime } from "../function/getRelativeTime"; interface CommentThreadsProps { commentClicked: () => void; comment?: CommentSchema; } const CommentThreads: React.FC = ({ commentClicked, comment }) => { const [expand, setExpand] = useState(false); const commentsedUsers = [{ creatorId: "1" }]; const { userName } = getUserData(); function getUsername(userId: string) { const UserName = userName?.charAt(0).toUpperCase() || "user"; return UserName; } function getDetails(type?: "clicked") { if (type === "clicked") { setExpand(true); commentClicked(); } else { setExpand((prev) => !prev); } } return (
); }; export default CommentThreads;