From 544f1c58d63c776e799ce2bef9df5410e987030c Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 20 Oct 2023 15:38:23 +0300 Subject: [PATCH] fix(UserGroup): fix types error --- src/components/UserGroup.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/UserGroup.tsx b/src/components/UserGroup.tsx index aeab37850..007d3ac82 100644 --- a/src/components/UserGroup.tsx +++ b/src/components/UserGroup.tsx @@ -5,7 +5,7 @@ import { getUserName, prepareUserDataFromActivity } from '../utils/getUserName'; type User = ComponentProps['users'][number]; -interface UserGroupProps extends ComponentProps { +interface UserGroupProps extends Omit, 'users'> { users: Array<{ user?: User | null; ghost?: User | null; @@ -15,7 +15,7 @@ interface UserGroupProps extends ComponentProps { export const UserGroup = ({ users, ...rest }: UserGroupProps) => { const extractedUsers = useMemo( () => - users.reduce((acc, activity) => { + users.reduce((acc, activity) => { const target = prepareUserDataFromActivity(activity); if (target != null) { @@ -30,5 +30,6 @@ export const UserGroup = ({ users, ...rest }: UserGroupProps) => { }, []), [users], ); + return ; };