diff --git a/src/components/Ecosystem/EcosystemList.tsx b/src/components/Ecosystem/EcosystemList.tsx index 63b2a9087..df9b52683 100644 --- a/src/components/Ecosystem/EcosystemList.tsx +++ b/src/components/Ecosystem/EcosystemList.tsx @@ -92,6 +92,7 @@ const EcosystemList = () => { getData = setTimeout(() => { fetchEcosystems(); }, 1000); + return () => clearTimeout(getData); } else { fetchEcosystems(); } @@ -318,4 +319,4 @@ const EcosystemList = () => { ) } -export default EcosystemList; \ No newline at end of file +export default EcosystemList; diff --git a/src/components/Ecosystem/MemberList.tsx b/src/components/Ecosystem/MemberList.tsx index 9cbd830d6..32178f52b 100644 --- a/src/components/Ecosystem/MemberList.tsx +++ b/src/components/Ecosystem/MemberList.tsx @@ -55,6 +55,7 @@ const MemberList = () => { firstMember: { ecosystemRole: { name: string } }, secondMember: { ecosystemRole: { name: string } }, ) => { + // remove this sorting logic when implemented from backend const firstName = firstMember?.ecosystemRole?.name; const secondName = secondMember?.ecosystemRole?.name; @@ -222,4 +223,4 @@ const MemberList = () => { ); }; -export default MemberList; \ No newline at end of file +export default MemberList; diff --git a/src/components/Issuance/History.tsx b/src/components/Issuance/History.tsx index bbd4f5ed5..6346ddf5e 100644 --- a/src/components/Issuance/History.tsx +++ b/src/components/Issuance/History.tsx @@ -109,6 +109,7 @@ const HistoryBulkIssuance = () => { getData = setTimeout(() => { getConnections(); }, 1000); + return () => clearTimeout(getData); } else { getConnections(); } diff --git a/src/components/Issuance/HistoryDetails.tsx b/src/components/Issuance/HistoryDetails.tsx index ae44492ab..4899bd261 100644 --- a/src/components/Issuance/HistoryDetails.tsx +++ b/src/components/Issuance/HistoryDetails.tsx @@ -47,6 +47,7 @@ const HistoryDetails = ({ requestId }: IProps) => { getData = setTimeout(() => { getHistoryDetails(); }, 1000); + return () => clearTimeout(getData); } else { getHistoryDetails(); } diff --git a/src/components/Issuance/IssuedCrdentials.tsx b/src/components/Issuance/IssuedCrdentials.tsx index 2e5261250..138797e18 100644 --- a/src/components/Issuance/IssuedCrdentials.tsx +++ b/src/components/Issuance/IssuedCrdentials.tsx @@ -120,8 +120,8 @@ const CredentialList = () => { if (searchText.length >= 1) { getData = setTimeout(() => { getIssuedCredDefs() - }, 1000) + return () => clearTimeout(getData); } else { getIssuedCredDefs() } diff --git a/src/components/Verification/VerificationCredentialList.tsx b/src/components/Verification/VerificationCredentialList.tsx index 58dde168d..7d9b944c0 100644 --- a/src/components/Verification/VerificationCredentialList.tsx +++ b/src/components/Verification/VerificationCredentialList.tsx @@ -246,8 +246,11 @@ const VerificationCredentialList = () => { useEffect(() => { let getData: NodeJS.Timeout - if (searchText.length >= 1) { - getData = setTimeout(() => { }, 1000); + if (searchText?.length >= 1) { + getData = setTimeout(() => { + getproofRequestList() + }, 1000); + return () => clearTimeout(getData); } else { getproofRequestList() } diff --git a/src/components/organization/OrganizationsList.tsx b/src/components/organization/OrganizationsList.tsx index f04c27ec6..7e5f612f1 100644 --- a/src/components/organization/OrganizationsList.tsx +++ b/src/components/organization/OrganizationsList.tsx @@ -88,6 +88,7 @@ const OrganizationsList = () => { getData = setTimeout(() => { getAllOrganizations(); }, 1000); + return () => clearTimeout(getData); } else { getAllOrganizations(); } diff --git a/src/components/organization/invitations/Invitations.tsx b/src/components/organization/invitations/Invitations.tsx index 9cff0a039..864978cd2 100644 --- a/src/components/organization/invitations/Invitations.tsx +++ b/src/components/organization/invitations/Invitations.tsx @@ -83,8 +83,8 @@ const Invitations = () => { if (searchText.length >= 1) { getData = setTimeout(() => { getAllInvitations() - }, 1000) + return () => clearTimeout(getData); } else { getAllInvitations() } diff --git a/src/components/organization/invitations/ReceivedInvitations.tsx b/src/components/organization/invitations/ReceivedInvitations.tsx index 764decb5a..9a8ae70d2 100644 --- a/src/components/organization/invitations/ReceivedInvitations.tsx +++ b/src/components/organization/invitations/ReceivedInvitations.tsx @@ -80,6 +80,7 @@ const ReceivedInvitations = () => { getData = setTimeout(() => { getAllInvitations(); }, 1000); + return () => clearTimeout(getData); } else { getAllInvitations(); } diff --git a/src/components/organization/users/Members.tsx b/src/components/organization/users/Members.tsx index 3b16b6eb8..84f8db327 100644 --- a/src/components/organization/users/Members.tsx +++ b/src/components/organization/users/Members.tsx @@ -89,6 +89,7 @@ const Members = () => { getData = setTimeout(() => { getAllUsers(); }, 1000); + return () => clearTimeout(getData); } else { getAllUsers(); } diff --git a/src/components/publicProfile/OrganisationPublicProfile.tsx b/src/components/publicProfile/OrganisationPublicProfile.tsx index 9fdc88e9d..bb908173e 100644 --- a/src/components/publicProfile/OrganisationPublicProfile.tsx +++ b/src/components/publicProfile/OrganisationPublicProfile.tsx @@ -66,6 +66,7 @@ const OrganisationPublicProfile = () => { getData = setTimeout(() => { getAllOrganizations(); }, 1000); + return () => clearTimeout(getData); } else { getAllOrganizations(); }