Skip to content

Commit

Permalink
Merge pull request #2109 from IntersectMBO/fix/2090-drep-directory-in…
Browse files Browse the repository at this point in the history
…finite-loading

[#2090] fix infinite loading in DRep Directory
  • Loading branch information
jdyczka authored Oct 2, 2024
2 parents 274d2ff + 7826b55 commit 509440a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ changes.

- Add missing testIds for submitted votes [Issue 1875](https://github.com/IntersectMBO/govtool/issues/1875)
- Provide workaround for iOS for downloading metadata on iOS [Issue 1989](https://github.com/IntersectMBO/govtool/issues/1989)
- Fix infinite loading in DRep Directory [Issue 2090](https://github.com/IntersectMBO/govtool/issues/2090)

### Changed

Expand Down
10 changes: 5 additions & 5 deletions govtool/frontend/src/hooks/queries/useGetDRepListQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ export const useGetDRepListInfiniteQuery = (
pendingTransaction.registerAsDrep ||
pendingTransaction.retireAsDirectVoter ||
pendingTransaction.retireAsDrep
)?.transactionHash,
filters,
searchPhrase,
sorting,
status,
)?.transactionHash ?? 'noPendingTransaction',
filters.length ? filters : "",
searchPhrase ?? "",
sorting ?? "",
status?.length ? status : "",
],
async ({ pageParam = 0 }) =>
getDRepList({
Expand Down
4 changes: 2 additions & 2 deletions govtool/frontend/src/pages/DRepDirectoryContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export const DRepDirectoryContent: FC<DRepDirectoryContentProps> = ({
dataActionsBarProps;

useEffect(() => {
setChosenSorting(DRepListSort.Random);
}, [setChosenSorting]);
if (!chosenSorting) setChosenSorting(DRepListSort.Random);
}, [chosenSorting, setChosenSorting]);

const { delegate, isDelegating } = useDelegateTodRep();

Expand Down

0 comments on commit 509440a

Please sign in to comment.