Files
plane/apps/web/ce/constants/sidebar-favorites.ts

43 lines
1.1 KiB
TypeScript
Raw Permalink Normal View History

import type { LucideIcon } from "lucide-react";
// plane imports
import type { ISvgIcons } from "@plane/propel/icons";
import { CycleIcon, FavoriteFolderIcon, ModuleIcon, PageIcon, ProjectIcon, ViewsIcon } from "@plane/propel/icons";
import type { IFavorite } from "@plane/types";
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,
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}`,
},
};