Skip to content

Commit 1eb1e82

Browse files
authored
fix: issue icons in published project link (#6576)
1 parent a2328d0 commit 1eb1e82

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { List, Kanban, LucideProps } from "lucide-react";
2+
import { TIssueLayout } from "@plane/constants";
3+
4+
export const IssueLayoutIcon = ({ layout, ...props }: { layout: TIssueLayout } & LucideProps) => {
5+
switch (layout) {
6+
case "list":
7+
return <List {...props} />;
8+
case "kanban":
9+
return <Kanban {...props} />;
10+
default:
11+
return null;
12+
}
13+
};

space/core/components/issues/navbar/layout-selection.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { queryParamGenerator } from "@/helpers/query-param-generator";
1414
import { useIssueFilter } from "@/hooks/store";
1515
// mobx
1616
import { TIssueLayout } from "@/types/issue";
17+
import { IssueLayoutIcon } from "./layout-icon";
1718

1819
type Props = {
1920
anchor: string;
@@ -57,8 +58,8 @@ export const IssuesLayoutSelection: FC<Props> = observer((props) => {
5758
}`}
5859
onClick={() => handleCurrentBoardView(layout.key)}
5960
>
60-
<layout.icon
61-
strokeWidth={2}
61+
<IssueLayoutIcon
62+
layout={layout.key}
6263
className={`size-3.5 ${activeLayout == layout.key ? "text-custom-text-100" : "text-custom-text-200"}`}
6364
/>
6465
</button>

0 commit comments

Comments
 (0)