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

Update DApps query filtering #13

Merged
merged 2 commits into from
Jun 15, 2023
Merged
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
3 changes: 0 additions & 3 deletions apps/rollups/graphql/subgraph/rollups.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ query dapps(
inputCount
deploymentTimestamp
activityTimestamp
factory {
id
}
}
}

Expand Down
10 changes: 9 additions & 1 deletion apps/rollups/src/containers/rollups/Dapps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import {
import { FC, useState } from 'react';
import { DAppsList } from '../../components/DAppsList';
import {
DAppStatus,
DApp_OrderBy,
useDappsQuery,
useDashboardQuery,
Expand Down Expand Up @@ -174,13 +175,20 @@ export const Dapps: FC<DappsProps> = (props) => {
DApp_OrderBy.ActivityTimestamp
);
const perPage = 10;

const status = DAppStatus.CreatedByFactory;
const [dAppsResult] = useDappsQuery({
variables: {
orderBy,
first: perPage,
skip: perPage * pageNumber,
where_dapp:
search && search.length > 0 ? { id: search } : undefined,
search && search.length > 0
? {
id: search,
status,
}
: { status },
},
});
const [dashboardResult] = useDashboardQuery({
Expand Down
2 changes: 1 addition & 1 deletion apps/rollups/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"compilerOptions": {
"strict": false,
"isolatedModules": false
"isolatedModules": true
},
"exclude": ["node_modules"],
"include": [
Expand Down
Loading