Skip to content

Commit

Permalink
fix: #79
Browse files Browse the repository at this point in the history
  • Loading branch information
sametcn99 committed Jun 22, 2024
1 parent 7fbabaf commit 7ecc0ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Binary file modified bun.lockb
Binary file not shown.
5 changes: 3 additions & 2 deletions components/ProfileCard/ContactList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ export default function ContactList({
const signal = abortController.signal;

const fetchData = async () => {
let page = 1; // Initial page number
let allDataFetched = false;
if (data.length > 0) return; // Return if data is already fetched
let page = 1; // Initial page number

setLoading(true); // Set loading to true when data fetching starts

Expand Down Expand Up @@ -93,7 +94,7 @@ export default function ContactList({
isMounted = false; // Unmount the component
abortController.abort(); // Abort ongoing requests
};
}, [dialogOpen, username, option]);
}, [dialogOpen, username, option, data.length]);

// Filter data based on user input and selected filter option
const filteredData = data.filter((item: UserData) => {
Expand Down

1 comment on commit 7ecc0ce

@vercel
Copy link

@vercel vercel bot commented on 7ecc0ce Jun 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.