import { observer } from "mobx-react-lite"; // hooks // icons import { Contrast, LayoutGrid, Users } from "lucide-react"; // helpers import { renderEmoji } from "helpers/emoji.helper"; import { truncateText } from "helpers/string.helper"; import { useProject } from "hooks/store"; type Props = { projectIds: string[]; }; export const CustomAnalyticsSidebarProjectsList: React.FC = observer((props) => { const { projectIds } = props; const { getProjectById } = useProject(); return (

Selected Projects

{projectIds.map((projectId) => { const project = getProjectById(projectId); if (!project) return; return (
{project.emoji ? ( {renderEmoji(project.emoji)} ) : project.icon_prop ? (
{renderEmoji(project.icon_prop)}
) : ( {project?.name.charAt(0)} )}

{truncateText(project.name, 20)}

({project.identifier})
Total members
{project.total_members}
Total cycles
{project.total_cycles}
Total modules
{project.total_modules}
); })}
); });