Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

[WEB-4597] fix: project icon render in switcher #7504

Vamsi Krishna876ccce86b6e
diff --git a/apps/web/ce/components/breadcrumbs/project.tsx b/apps/web/ce/components/breadcrumbs/project.tsx
index 00c815cdce..1beab197aa 100644
--- a/apps/web/ce/components/breadcrumbs/project.tsx
+++ b/apps/web/ce/components/breadcrumbs/project.tsx
@@ -37,7 +37,9 @@ export const ProjectBreadcrumb = observer((props: TProjectBreadcrumbProps) => {
return {
value: projectId,
query: project?.name,
- content: <SwitcherLabel name={project?.name} logo_props={project?.logo_props} LabelIcon={Briefcase} />,
+ content: (
+ <SwitcherLabel name={project?.name} logo_props={project?.logo_props} LabelIcon={Briefcase} type="material" />
+ ),
};
})
.filter((option) => option !== undefined) as ICustomSearchSelectOption[];
diff --git a/apps/web/core/components/common/switcher-label.tsx b/apps/web/core/components/common/switcher-label.tsx
index d1f1fc4bc8..7cca4c908d 100644
--- a/apps/web/core/components/common/switcher-label.tsx
+++ b/apps/web/core/components/common/switcher-label.tsx
@@ -8,11 +8,18 @@ type TSwitcherIconProps = {
logo_url?: string;
LabelIcon: FC<ISvgIcons>;
size?: number;
+ type?: "lucide" | "material";
};
-export const SwitcherIcon: FC<TSwitcherIconProps> = ({ logo_props, logo_url, LabelIcon, size = 12 }) => {
+export const SwitcherIcon: FC<TSwitcherIconProps> = ({
+ logo_props,
+ logo_url,
+ LabelIcon,
+ size = 12,
+ type = "lucide",
+}) => {
if (logo_props?.in_use) {
- return <Logo logo={logo_props} size={size} type="lucide" />;
+ return <Logo logo={logo_props} size={size} type={type} />;
}
if (logo_url) {
@@ -33,13 +40,14 @@ type TSwitcherLabelProps = {
logo_url?: string;
name?: string;
LabelIcon: FC<ISvgIcons>;
+ type?: "lucide" | "material";
};
export const SwitcherLabel: FC<TSwitcherLabelProps> = (props) => {
- const { logo_props, name, LabelIcon, logo_url } = props;
+ const { logo_props, name, LabelIcon, logo_url, type = "lucide" } = props;
return (
<div className="flex items-center gap-1 text-custom-text-200">
- <SwitcherIcon logo_props={logo_props} logo_url={logo_url} LabelIcon={LabelIcon} />
+ <SwitcherIcon logo_props={logo_props} logo_url={logo_url} LabelIcon={LabelIcon} type={type} />
{truncateText(name ?? "", 40)}
</div>
);