[WEB-2880] chore: project detail response updated (#6281)
* chore: project detail response updated * chore: code refactor
This commit is contained in:
parent
756a71ca78
commit
2f2f8dc5f4
2 changed files with 10 additions and 5 deletions
1
packages/types/src/project/projects.d.ts
vendored
1
packages/types/src/project/projects.d.ts
vendored
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue