Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #2204

Merged
merged 3 commits into from
Feb 12, 2024
Merged

Release #2204

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion apps/web/app/[locale]/profile/[memberId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ const Profile = React.memo(function ProfilePage({ params }: { params: { memberId
)}

<Container fullWidth={fullWidth} className="mb-10">
{activityScreens[activityFilter] ?? null}
{hook.tab !== 'worked' ? (
<UserProfileTask profile={profile} tabFiltered={hook} />
) : (
activityScreens[activityFilter] ?? null
)}
</Container>
</MainLayout>
</>
Expand Down
1 change: 0 additions & 1 deletion apps/web/app/hooks/useInfinityFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export const useInfinityScrolling = <T>(arr: T[], lim?: number) => {
}, [limit, offset]);

React.useEffect(() => {
console.log({ offset });
getSomeTasks(offset);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [offset]);
Expand Down
3 changes: 2 additions & 1 deletion apps/web/lib/features/user-profile-tasks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
profile.member?.running == true ? t.id !== profile.activeUserTeamTask?.id : t
);
const { nextOffset, data } = useInfinityScrolling(otherTasks);
const dataTodisplay = otherTasks.length > 10 ? otherTasks : data;

Check warning on line 34 in apps/web/lib/features/user-profile-tasks.tsx

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (Todisplay)
// const { total, onPageChange, itemsPerPage, itemOffset, endOffset, setItemsPerPage, currentItems } =
// usePagination(otherTasks);

Expand Down Expand Up @@ -84,7 +85,7 @@
)}

<ul className="flex flex-col gap-6">
{data.map((task, index) => {
{dataTodisplay.map((task, index) => {

Check warning on line 88 in apps/web/lib/features/user-profile-tasks.tsx

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (Todisplay)
return (
<li key={task.id}>
<ObserverComponent isLast={index === data.length - 1} getNextData={nextOffset} />
Expand Down
Loading