2025-10-14 16:45:07 +05:30
|
|
|
import type { LucideIcon } from "lucide-react";
|
2025-03-07 13:17:13 +05:30
|
|
|
// plane imports
|
2025-10-14 16:45:07 +05:30
|
|
|
import type { ISvgIcons } from "@plane/propel/icons";
|
|
|
|
|
import { CycleIcon, FavoriteFolderIcon, ModuleIcon, PageIcon, ProjectIcon, ViewsIcon } from "@plane/propel/icons";
|
|
|
|
|
import type { IFavorite } from "@plane/types";
|
2025-03-07 13:17:13 +05:30
|
|
|
|
|
|
|
|
export const FAVORITE_ITEM_ICONS: Record<string, React.FC<ISvgIcons> | LucideIcon> = {
|
2025-10-13 19:43:24 +05:30
|
|
|
page: PageIcon,
|
|
|
|
|
project: ProjectIcon,
|
|
|
|
|
view: ViewsIcon,
|
|
|
|
|
module: ModuleIcon,
|
|
|
|
|
cycle: CycleIcon,
|
2025-03-07 13:17:13 +05:30
|
|
|
folder: FavoriteFolderIcon,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const FAVORITE_ITEM_LINKS: {
|
|
|
|
|
[key: string]: {
|
|
|
|
|
itemLevel: "project" | "workspace";
|
|
|
|
|
getLink: (favorite: IFavorite) => string;
|
|
|
|
|
};
|
|
|
|
|
} = {
|
|
|
|
|
project: {
|
|
|
|
|
itemLevel: "project",
|
|
|
|
|
getLink: () => `issues`,
|
|
|
|
|
},
|
|
|
|
|
cycle: {
|
|
|
|
|
itemLevel: "project",
|
|
|
|
|
getLink: (favorite) => `cycles/${favorite.entity_identifier}`,
|
|
|
|
|
},
|
|
|
|
|
module: {
|
|
|
|
|
itemLevel: "project",
|
|
|
|
|
getLink: (favorite) => `modules/${favorite.entity_identifier}`,
|
|
|
|
|
},
|
|
|
|
|
view: {
|
|
|
|
|
itemLevel: "project",
|
|
|
|
|
getLink: (favorite) => `views/${favorite.entity_identifier}`,
|
|
|
|
|
},
|
|
|
|
|
page: {
|
|
|
|
|
itemLevel: "project",
|
|
|
|
|
getLink: (favorite) => `pages/${favorite.entity_identifier}`,
|
|
|
|
|
},
|
|
|
|
|
};
|