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

[#2090] fix infinite loading in DRep Directory #2109

Merged
merged 1 commit into from
Oct 2, 2024
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
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
Loading