[WEB-2880] chore: project detail response updated (#6281)

* chore: project detail response updated

* chore: code refactor
This commit is contained in:
Anmol Singh Bhatia 2024-12-27 09:17:35 +05:30 committed by GitHub
parent 756a71ca78
commit 2f2f8dc5f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 5 deletions

View file

@ -15,6 +15,7 @@ export interface IProject {
archived_at: string | null;
archived_issues: number;
archived_sub_issues: number;
completed_issues: number;
close_in: number;
created_at: Date;
created_by: string;

View file

@ -1,7 +1,7 @@
import { ReactNode, useRef, useState } from "react";
import { observer } from "mobx-react";
import { usePopper } from "react-popper";
import { Check, ChevronDown, Search } from "lucide-react";
import { Briefcase, Check, ChevronDown, Search } from "lucide-react";
import { Combobox } from "@headlessui/react";
// ui
import { ComboDropDown } from "@plane/ui";
@ -143,10 +143,14 @@ export const ProjectDropdown: React.FC<Props> = observer((props) => {
if (Array.isArray(value)) {
return (
<div className="flex items-center gap-0.5">
{value.map((projectId) => {
{value.length > 0 ? (
value.map((projectId) => {
const projectDetails = getProjectById(projectId);
return projectDetails ? renderIcon(projectDetails) : null;
})}
})
) : (
<Briefcase className="size-3 text-custom-text-300" />
)}
</div>
);
} else {