diff --git a/apps/app/components/issues/select/label.tsx b/apps/app/components/issues/select/label.tsx index 74bc87eb5..bed23fce5 100644 --- a/apps/app/components/issues/select/label.tsx +++ b/apps/app/components/issues/select/label.tsx @@ -20,6 +20,7 @@ import issuesServices from "services/issues.service"; import type { IIssueLabels } from "types"; // fetch-keys import { PROJECT_ISSUE_LABELS } from "constants/fetch-keys"; +import { IssueLabelList } from "components/ui"; type Props = { setIsOpen: React.Dispatch>; @@ -70,12 +71,11 @@ export const IssueLabelSelect: React.FC = ({ setIsOpen, value, onChange, > {value && value.length > 0 ? ( - - {Array.isArray(value) - ? value.map((v) => issueLabels?.find((l) => l.id === v)?.name).join(", ") || - "Labels" - : issueLabels?.find((l) => l.id === value)?.name || "Labels"} - + issueLabels?.find((l) => l.id === v)?.color) ?? []} + length={3} + showLength + /> {value.length} Labels ) : ( diff --git a/apps/app/components/ui/avatar.tsx b/apps/app/components/ui/avatar.tsx index e4dc68839..2b1c7b2cc 100644 --- a/apps/app/components/ui/avatar.tsx +++ b/apps/app/components/ui/avatar.tsx @@ -18,7 +18,7 @@ type AvatarProps = { }; export const Avatar: React.FC = ({ user, index }) => ( -
+
{user && user.avatar && user.avatar !== "" ? (
= ({ + labels, + length = 5, + showLength = true, +}) => ( + <> + {labels && ( + <> + {labels.map((color, index) => ( +
+ +
+ ))} + {labels.length > length ? +{labels.length - length} : null} + + )} + +);