From ba5a4f9a04d519a81d4f4174121d45b74828b553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Thu, 31 Oct 2024 17:05:52 +0100 Subject: [PATCH 1/2] fix(#2285): fix infinite DRep list loading --- CHANGELOG.md | 2 +- govtool/frontend/src/context/dataActionsBar.tsx | 6 ++++-- govtool/frontend/src/hooks/queries/useGetDRepListQuery.ts | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4181941a8..9eb2949b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ changes. ### Fixed -- +- Fix infinite DRep list loading [Issue 2285](https://github.com/IntersectMBO/govtool/issues/2285) ### Changed diff --git a/govtool/frontend/src/context/dataActionsBar.tsx b/govtool/frontend/src/context/dataActionsBar.tsx index 5bb3acf32..c6fb920e6 100644 --- a/govtool/frontend/src/context/dataActionsBar.tsx +++ b/govtool/frontend/src/context/dataActionsBar.tsx @@ -75,7 +75,9 @@ const DataActionsBarProvider: FC = ({ children }) => { useEffect(() => { if ( - (userMovedToDifferentAppArea && !userOpenedGADetailsFromCategoryPage) || + (!pathname.includes("drep_directory") && + userMovedToDifferentAppArea && + !userOpenedGADetailsFromCategoryPage) || userMovedFromGAListToCategoryPage ) { resetState(); @@ -116,7 +118,7 @@ const DataActionsBarProvider: FC = ({ children }) => { ); return ( - + {children} ); diff --git a/govtool/frontend/src/hooks/queries/useGetDRepListQuery.ts b/govtool/frontend/src/hooks/queries/useGetDRepListQuery.ts index 562eb4930..c6f0f968b 100644 --- a/govtool/frontend/src/hooks/queries/useGetDRepListQuery.ts +++ b/govtool/frontend/src/hooks/queries/useGetDRepListQuery.ts @@ -33,7 +33,7 @@ export const useGetDRepListInfiniteQuery = ( pendingTransaction.registerAsDrep || pendingTransaction.retireAsDirectVoter || pendingTransaction.retireAsDrep - )?.transactionHash ?? 'noPendingTransaction', + )?.transactionHash ?? "noPendingTransaction", filters.length ? filters : "", searchPhrase ?? "", sorting ?? "", From b03c9d865112e31aaa6927469bb7bfee0d79583a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Thu, 31 Oct 2024 18:41:46 +0100 Subject: [PATCH 2/2] chore: bump GovTool to v1.0.24 --- CHANGELOG.md | 18 ++++++++++++++++++ govtool/backend/Dockerfile | 2 +- govtool/backend/Dockerfile.qovery | 2 +- govtool/backend/vva-be.cabal | 2 +- govtool/frontend/package-lock.json | 4 ++-- govtool/frontend/package.json | 4 ++-- govtool/metadata-validation/package-lock.json | 4 ++-- govtool/metadata-validation/package.json | 2 +- govtool/metadata-validation/src/main.ts | 2 +- 9 files changed, 29 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9eb2949b6..2b7bbe320 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,24 @@ changes. ### Fixed +- + +### Changed + +- + +### Removed + +- + +## [v1.0.24](https://github.com/IntersectMBO/govtool/releases/tag/v1.0.24) 2024-10-31 + +### Added + +- + +### Fixed + - Fix infinite DRep list loading [Issue 2285](https://github.com/IntersectMBO/govtool/issues/2285) ### Changed diff --git a/govtool/backend/Dockerfile b/govtool/backend/Dockerfile index 8ea278247..75f61361c 100644 --- a/govtool/backend/Dockerfile +++ b/govtool/backend/Dockerfile @@ -4,4 +4,4 @@ FROM $BASE_IMAGE_REPO:$BASE_IMAGE_TAG WORKDIR /src COPY . . RUN cabal build -RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-1.0.23/x/vva-be/build/vva-be/vva-be /usr/local/bin +RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-1.0.24/x/vva-be/build/vva-be/vva-be /usr/local/bin diff --git a/govtool/backend/Dockerfile.qovery b/govtool/backend/Dockerfile.qovery index 5d4b35a4d..0ff39f726 100644 --- a/govtool/backend/Dockerfile.qovery +++ b/govtool/backend/Dockerfile.qovery @@ -4,7 +4,7 @@ FROM $BASE_IMAGE_REPO:$BASE_IMAGE_TAG WORKDIR /src COPY . . RUN cabal build -RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-1.0.23/x/vva-be/build/vva-be/vva-be /usr/local/bin +RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-1.0.24/x/vva-be/build/vva-be/vva-be /usr/local/bin # Expose the necessary port EXPOSE 9876 diff --git a/govtool/backend/vva-be.cabal b/govtool/backend/vva-be.cabal index 8b750a2b3..5d2376e3b 100644 --- a/govtool/backend/vva-be.cabal +++ b/govtool/backend/vva-be.cabal @@ -1,6 +1,6 @@ cabal-version: 3.6 name: vva-be -version: 1.0.23 +version: 1.0.24 -- A short (one-line) description of the package. -- synopsis: diff --git a/govtool/frontend/package-lock.json b/govtool/frontend/package-lock.json index bdd0af72b..f16bb25d3 100644 --- a/govtool/frontend/package-lock.json +++ b/govtool/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "@govtool/frontend", - "version": "1.0.23", + "version": "1.0.24", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@govtool/frontend", - "version": "1.0.23", + "version": "1.0.24", "hasInstallScript": true, "dependencies": { "@emotion/react": "^11.11.1", diff --git a/govtool/frontend/package.json b/govtool/frontend/package.json index d1892bfe9..e00c26a4c 100644 --- a/govtool/frontend/package.json +++ b/govtool/frontend/package.json @@ -1,7 +1,7 @@ { "name": "@govtool/frontend", "private": true, - "version": "1.0.23", + "version": "1.0.24", "type": "module", "scripts": { "build": "vite build", @@ -109,5 +109,5 @@ "typescript": "^5.0.2" }, "readme": "ERROR: No README data found!", - "_id": "govtool@1.0.23" + "_id": "govtool@1.0.24" } diff --git a/govtool/metadata-validation/package-lock.json b/govtool/metadata-validation/package-lock.json index a1dbcdbf8..594f96fb9 100644 --- a/govtool/metadata-validation/package-lock.json +++ b/govtool/metadata-validation/package-lock.json @@ -1,12 +1,12 @@ { "name": "@govtool/metadata-validation", - "version": "1.0.23", + "version": "1.0.24", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@govtool/metadata-validation", - "version": "1.0.23", + "version": "1.0.24", "license": "UNLICENSED", "dependencies": { "@nestjs/axios": "^3.0.2", diff --git a/govtool/metadata-validation/package.json b/govtool/metadata-validation/package.json index 4b2624b55..6c768ae0e 100644 --- a/govtool/metadata-validation/package.json +++ b/govtool/metadata-validation/package.json @@ -1,6 +1,6 @@ { "name": "@govtool/metadata-validation", - "version": "1.0.23", + "version": "1.0.24", "description": "", "author": "", "private": true, diff --git a/govtool/metadata-validation/src/main.ts b/govtool/metadata-validation/src/main.ts index 52cc325b0..1aefef055 100644 --- a/govtool/metadata-validation/src/main.ts +++ b/govtool/metadata-validation/src/main.ts @@ -13,7 +13,7 @@ async function bootstrap() { const config = new DocumentBuilder() .setTitle('Metadata Validation Tool') .setDescription('The Metadata Validation Tool API description') - .setVersion('1.0.23') + .setVersion('1.0.24') .build(); const document = SwaggerModule.createDocument(app, config);