From b6b8aa69d4e4fed2099b80f3974d713f20100559 Mon Sep 17 00:00:00 2001 From: kevin Date: Mon, 5 Aug 2024 17:41:55 -0400 Subject: [PATCH 1/4] chore: cleanup of props in editor BOS --- frontend/replacement.dev.json | 4 ++-- frontend/widgets/src/QueryApi.Editor.jsx | 16 +++++++--------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/frontend/replacement.dev.json b/frontend/replacement.dev.json index 783dd1a8..8580237d 100644 --- a/frontend/replacement.dev.json +++ b/frontend/replacement.dev.json @@ -1,7 +1,7 @@ { "REPL_ACCOUNT_ID": "dev-queryapi.dataplatform.near", "REPL_GRAPHQL_ENDPOINT": "https://near-queryapi.dev.api.pagoda.co", - "REPL_EXTERNAL_APP_URL": "https://queryapi-frontend-vcqilefdcq-ew.a.run.app", + "REPL_EXTERNAL_APP_URL": "http://localhost:3000", "REPL_REGISTRY_CONTRACT_ID": "dev-queryapi.dataplatform.near", "REPL_QUERY_API_USAGE_URL": "https://storage.googleapis.com/databricks-near-query-runner/output/query-api-usage/indexers_dev.json" -} +} \ No newline at end of file diff --git a/frontend/widgets/src/QueryApi.Editor.jsx b/frontend/widgets/src/QueryApi.Editor.jsx index bfffc7b2..4092627d 100644 --- a/frontend/widgets/src/QueryApi.Editor.jsx +++ b/frontend/widgets/src/QueryApi.Editor.jsx @@ -83,18 +83,16 @@ const requestHandler = (request, response) => { } }; -const props = { - externalAppUrl, - path, - initialViewHeight, - initialPayload, - requestHandler, -}; - // NearSocialBridgeCore widget is the core that makes all the "magic" happens return ( ); From 86528490c23353640c3ecc147d6a65750bf22284 Mon Sep 17 00:00:00 2001 From: kevin Date: Mon, 5 Aug 2024 17:59:10 -0400 Subject: [PATCH 2/4] fix: display issue missing indexers --- frontend/widgets/src/QueryApi.IndexerExplorer.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/widgets/src/QueryApi.IndexerExplorer.jsx b/frontend/widgets/src/QueryApi.IndexerExplorer.jsx index 8456be1c..ea3426a6 100644 --- a/frontend/widgets/src/QueryApi.IndexerExplorer.jsx +++ b/frontend/widgets/src/QueryApi.IndexerExplorer.jsx @@ -40,7 +40,7 @@ const [hasMetadataRendered, setHasMetadataRendered] = useState(false); const [indexers, setIndexers] = useState([]); const [total, setTotal] = useState(0); const [currentPageIndexer, setCurrentPageIndexer] = useState([]); -const [page, setPage] = useState(0); +const [page, setPage] = useState(1); const [myIndexers, setMyIndexers] = useState([]); From f5a5c3e8a9204a216bf06049ae17edf104703c71 Mon Sep 17 00:00:00 2001 From: kevin Date: Mon, 5 Aug 2024 18:13:34 -0400 Subject: [PATCH 3/4] chore --- frontend/replacement.dev.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/replacement.dev.json b/frontend/replacement.dev.json index 8580237d..783dd1a8 100644 --- a/frontend/replacement.dev.json +++ b/frontend/replacement.dev.json @@ -1,7 +1,7 @@ { "REPL_ACCOUNT_ID": "dev-queryapi.dataplatform.near", "REPL_GRAPHQL_ENDPOINT": "https://near-queryapi.dev.api.pagoda.co", - "REPL_EXTERNAL_APP_URL": "http://localhost:3000", + "REPL_EXTERNAL_APP_URL": "https://queryapi-frontend-vcqilefdcq-ew.a.run.app", "REPL_REGISTRY_CONTRACT_ID": "dev-queryapi.dataplatform.near", "REPL_QUERY_API_USAGE_URL": "https://storage.googleapis.com/databricks-near-query-runner/output/query-api-usage/indexers_dev.json" -} \ No newline at end of file +} From a750b24b2f6643fdc03ee6663ac3f7a5181881ed Mon Sep 17 00:00:00 2001 From: kevin Date: Tue, 6 Aug 2024 15:07:30 -0400 Subject: [PATCH 4/4] fix: modified logic to start page from 0 --- frontend/widgets/src/QueryApi.IndexerExplorer.jsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/widgets/src/QueryApi.IndexerExplorer.jsx b/frontend/widgets/src/QueryApi.IndexerExplorer.jsx index ea3426a6..cc08954d 100644 --- a/frontend/widgets/src/QueryApi.IndexerExplorer.jsx +++ b/frontend/widgets/src/QueryApi.IndexerExplorer.jsx @@ -40,7 +40,7 @@ const [hasMetadataRendered, setHasMetadataRendered] = useState(false); const [indexers, setIndexers] = useState([]); const [total, setTotal] = useState(0); const [currentPageIndexer, setCurrentPageIndexer] = useState([]); -const [page, setPage] = useState(1); +const [page, setPage] = useState(0); const [myIndexers, setMyIndexers] = useState([]); @@ -188,11 +188,12 @@ useEffect(() => { }, [selectedTab, hasMetadataRendered]); const handleLoadMore = () => { - const start = page * PAGE_SIZE; + const nextPage = page + 1; + const start = nextPage * PAGE_SIZE; const end = start + PAGE_SIZE; const newIndexers = indexers.slice(start, end); setCurrentPageIndexer([...currentPageIndexer, ...newIndexers]); - setPage(page + 1); + setPage(nextPage); }; const backupNearRPCRequest = () => {