// components import { TWidgetKeys } from "@plane/types"; import { AssignedIssuesWidgetLoader } from "./assigned-issues"; import { IssuesByPriorityWidgetLoader } from "./issues-by-priority"; import { IssuesByStateGroupWidgetLoader } from "./issues-by-state-group"; import { OverviewStatsWidgetLoader } from "./overview-stats"; import { RecentActivityWidgetLoader } from "./recent-activity"; import { RecentCollaboratorsWidgetLoader } from "./recent-collaborators"; import { RecentProjectsWidgetLoader } from "./recent-projects"; // types type Props = { widgetKey: TWidgetKeys; }; export const WidgetLoader: React.FC = (props) => { const { widgetKey } = props; const loaders = { overview_stats: , assigned_issues: , created_issues: , issues_by_state_groups: , issues_by_priority: , recent_activity: , recent_projects: , recent_collaborators: , }; return loaders[widgetKey]; };