From 1c77261b230ffa19643f0ffb3c4c1ee442d69c91 Mon Sep 17 00:00:00 2001 From: cedric karungu Date: Mon, 12 Feb 2024 01:53:13 +0200 Subject: [PATCH 1/2] fix: Task Assigment Tabs --- apps/web/app/[locale]/profile/[memberId]/page.tsx | 6 +++++- apps/web/lib/features/user-profile-tasks.tsx | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/web/app/[locale]/profile/[memberId]/page.tsx b/apps/web/app/[locale]/profile/[memberId]/page.tsx index dd6dfe852..81d7279f3 100644 --- a/apps/web/app/[locale]/profile/[memberId]/page.tsx +++ b/apps/web/app/[locale]/profile/[memberId]/page.tsx @@ -122,7 +122,11 @@ const Profile = React.memo(function ProfilePage({ params }: { params: { memberId )} - {activityScreens[activityFilter] ?? null} + {hook.tab !== 'worked' ? ( + + ) : ( + activityScreens[activityFilter] ?? null + )} diff --git a/apps/web/lib/features/user-profile-tasks.tsx b/apps/web/lib/features/user-profile-tasks.tsx index 7952dbd7b..220eec776 100644 --- a/apps/web/lib/features/user-profile-tasks.tsx +++ b/apps/web/lib/features/user-profile-tasks.tsx @@ -31,6 +31,7 @@ export function UserProfileTask({ profile, tabFiltered }: Props) { profile.member?.running == true ? t.id !== profile.activeUserTeamTask?.id : t ); const { nextOffset, data } = useInfinityScrolling(otherTasks); + const dataTodisplay = otherTasks.length > 10 ? otherTasks : data; // const { total, onPageChange, itemsPerPage, itemOffset, endOffset, setItemsPerPage, currentItems } = // usePagination(otherTasks); @@ -84,7 +85,7 @@ export function UserProfileTask({ profile, tabFiltered }: Props) { )}