mirror of
https://github.com/makeplane/plane.git
synced 2025-12-25 08:09:33 +01:00
[WEB-2358] fix: recent collaborators (#5532)
* fix: recent collaborators * fix: recent collaborators loader
This commit is contained in:
committed by
GitHub
parent
d265635f7e
commit
406ffcd7de
@@ -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}
|
||||
/>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user