Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mohandast52 committed Apr 4, 2024
1 parent e02f353 commit 2db3081
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 24 deletions.
6 changes: 3 additions & 3 deletions apps/autonolas-registry/components/ListAgents/details.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useCallback } from 'react';
import { useRouter } from 'next/router';

import Details from 'common-util/Details';
import { useHelpers } from 'common-util/hooks';
import { useCallback } from 'react';
import Details from '../../common-util/Details';
import { useHelpers } from '../../common-util/hooks';
import {
getAgentDetails,
updateAgentHashes,
Expand Down
9 changes: 2 additions & 7 deletions apps/autonolas-registry/components/ListAgents/useAgents.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export const useMyAgents = () => {
first: ${TOTAL_VIEW_COUNT},
skip: ${TOTAL_VIEW_COUNT * (currentPage - 1)},
where: {
owner: "${ownerAddress}",
packageType: agent
owner_contains_nocase: "${ownerAddress}",
},
orderBy: tokenId,
) ${columnsForAgentsAndComponents}
Expand Down Expand Up @@ -117,12 +117,7 @@ const useMyAgentsBySearch = () => {
and: [
{ packageType: "agent" }
{ owner_contains_nocase: "${ownerAddress}" }
{
or: [
{ publicId_contains_nocase: "${searchValue}" }
{ packageHash_contains_nocase: "${searchValue}" }
]
}
${getSearchFilterSubQueryForAgentsAndComponents(searchValue)}
]
}
orderBy: tokenId
Expand Down
8 changes: 4 additions & 4 deletions apps/autonolas-registry/components/ListAgents/utils.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getMechMinterContract, getAgentContract } from 'common-util/Contracts';
import { getFirstAndLastIndex } from 'common-util/List/functions';
import { getListByAccount } from 'common-util/ContractUtils/myList';
import { sendTransaction } from 'common-util/functions';
import { getMechMinterContract, getAgentContract } from '../../common-util/Contracts';
import { getFirstAndLastIndex } from '../../common-util/List/functions';
import { getListByAccount } from '../../common-util/ContractUtils/myList';
import { sendTransaction } from '../../common-util/functions';

// --------- HELPER METHODS ---------
export const getAgentOwner = async (agentId) => {
Expand Down
6 changes: 3 additions & 3 deletions apps/autonolas-registry/components/ListComponents/details.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useCallback } from 'react';
import { useRouter } from 'next/router';

import Details from 'common-util/Details';
import { useHelpers } from 'common-util/hooks';
import { useCallback } from 'react';
import Details from '../../common-util/Details';
import { useHelpers } from '../../common-util/hooks';
import {
getComponentDetails,
updateComponentHashes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export const useMyComponents = () => {
first: ${TOTAL_VIEW_COUNT},
skip: ${TOTAL_VIEW_COUNT * (currentPage - 1)},
where: {
owner: "${ownerAddress}",
${componentPackageType}
owner_contains_nocase: "${ownerAddress}",
},
orderBy: tokenId,
) ${columnsForAgentsAndComponents}
Expand Down Expand Up @@ -120,12 +120,7 @@ const useMyComponentsBySearch = () => {
and: [
{ ${componentPackageType} }
{ owner_contains_nocase: "${ownerAddress}" }
{
or: [
{ publicId_contains_nocase: "${searchValue}" }
{ packageHash_contains_nocase: "${searchValue}" }
]
}
${getSearchFilterSubQueryForAgentsAndComponents(searchValue)}
]
}
orderBy: tokenId
Expand Down

0 comments on commit 2db3081

Please sign in to comment.