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.

fix: issue icons in published project link (#6576)

Akshita Goyal1eb1e82fe49d
diff --git a/space/core/components/issues/navbar/layout-icon.tsx b/space/core/components/issues/navbar/layout-icon.tsx
new file mode 100644
index 0000000000..cf3b76093f
--- /dev/null
+++ b/space/core/components/issues/navbar/layout-icon.tsx
@@ -0,0 +1,13 @@
+import { List, Kanban, LucideProps } from "lucide-react";
+import { TIssueLayout } from "@plane/constants";
+
+export const IssueLayoutIcon = ({ layout, ...props }: { layout: TIssueLayout } & LucideProps) => {
+ switch (layout) {
+ case "list":
+ return <List {...props} />;
+ case "kanban":
+ return <Kanban {...props} />;
+ default:
+ return null;
+ }
+};
diff --git a/space/core/components/issues/navbar/layout-selection.tsx b/space/core/components/issues/navbar/layout-selection.tsx
index 36c8f8e243..3676f0f923 100644
--- a/space/core/components/issues/navbar/layout-selection.tsx
+++ b/space/core/components/issues/navbar/layout-selection.tsx
@@ -14,6 +14,7 @@ import { queryParamGenerator } from "@/helpers/query-param-generator";
import { useIssueFilter } from "@/hooks/store";
// mobx
import { TIssueLayout } from "@/types/issue";
+import { IssueLayoutIcon } from "./layout-icon";
type Props = {
anchor: string;
@@ -57,8 +58,8 @@ export const IssuesLayoutSelection: FC<Props> = observer((props) => {
}`}
onClick={() => handleCurrentBoardView(layout.key)}
>
- <layout.icon
- strokeWidth={2}
+ <IssueLayoutIcon
+ layout={layout.key}
className={`size-3.5 ${activeLayout == layout.key ? "text-custom-text-100" : "text-custom-text-200"}`}
/>
</button>