mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
fix: correct secret approval query filters column references, correct count query and handle pagination reset on frontend
This commit is contained in:
@@ -40,7 +40,7 @@ import {
|
||||
PreferenceKey,
|
||||
setUserTablePreference
|
||||
} from "@app/helpers/userTablePreferences";
|
||||
import { usePagination } from "@app/hooks";
|
||||
import { usePagination, useResetPageHelper } from "@app/hooks";
|
||||
import {
|
||||
useGetSecretApprovalRequestCount,
|
||||
useGetSecretApprovalRequests,
|
||||
@@ -99,6 +99,12 @@ export const SecretApprovalRequest = () => {
|
||||
const totalApprovalCount = data?.totalCount ?? 0;
|
||||
const secretApprovalRequests = data?.approvals ?? [];
|
||||
|
||||
useResetPageHelper({
|
||||
totalCount: totalApprovalCount,
|
||||
offset,
|
||||
setPage
|
||||
});
|
||||
|
||||
const { data: secretApprovalRequestCount, isSuccess: isSecretApprovalReqCountSuccess } =
|
||||
useGetSecretApprovalRequestCount({ projectId });
|
||||
const { user: userSession } = useUser();
|
||||
|
||||
Reference in New Issue
Block a user