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.

[WEB-2358] fix: recent collaborators (#5532)

Anmol Singh Bhatia406ffcd7dec7
diff --git a/web/core/components/dashboard/widgets/recent-collaborators/collaborators-list.tsx b/web/core/components/dashboard/widgets/recent-collaborators/collaborators-list.tsx
index bf7b6ac7d4..775980e177 100644
--- a/web/core/components/dashboard/widgets/recent-collaborators/collaborators-list.tsx
+++ b/web/core/components/dashboard/widgets/recent-collaborators/collaborators-list.tsx
@@ -78,12 +78,17 @@ export const CollaboratorsList: React.FC<CollaboratorsListProps> = (props) => {
data: TRecentCollaboratorsWidgetResponse[] | undefined;
};
- if (!widgetStats) return <WidgetLoader widgetKey={WIDGET_KEY} />;
+ if (!widgetStats)
+ return (
+ <div className="mt-7 mb-6 grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 xl:grid-cols-8 gap-2 gap-y-8">
+ <WidgetLoader widgetKey={WIDGET_KEY} />
+ </div>
+ );
- const sortedStats = sortBy(widgetStats, [(user) => user.user_id !== currentUser?.id]);
+ const sortedStats = sortBy(widgetStats, [(user) => user?.user_id !== currentUser?.id]);
const filteredStats = sortedStats.filter((user) => {
- const { display_name, first_name, last_name } = getUserDetails(user.user_id) || {};
+ const { display_name, first_name, last_name } = getUserDetails(user?.user_id) || {};
const searchLower = searchQuery.toLowerCase();
return (
@@ -97,9 +102,9 @@ export const CollaboratorsList: React.FC<CollaboratorsListProps> = (props) => {
<div className="mt-7 mb-6 grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 xl:grid-cols-8 gap-2 gap-y-8">
{filteredStats?.map((user) => (
<CollaboratorListItem
- key={user.user_id}
- issueCount={user.active_issue_count}
- userId={user.user_id}
+ key={user?.user_id}
+ issueCount={user?.active_issue_count}
+ userId={user?.user_id}
workspaceSlug={workspaceSlug}
/>
))}