feature: server-side pagination/filtering/sorting for secrets overview and main pages

This commit is contained in:
Scott Wilson
2024-09-18 21:17:48 -07:00
parent d6b7045461
commit d0656358a2
43 changed files with 2899 additions and 721 deletions
@@ -1,6 +1,7 @@
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { apiRequest } from "@app/config/request";
import { dashboardKeys } from "@app/hooks/api/dashboard/queries";
import { secretImportKeys } from "./queries";
import {
@@ -31,6 +32,9 @@ export const useCreateSecretImport = () => {
queryClient.invalidateQueries(
secretImportKeys.getSecretImportSecrets({ projectId, environment, path })
);
queryClient.invalidateQueries(
dashboardKeys.getDashboardSecrets({ projectId, secretPath: path ?? "/" })
);
}
});
};
@@ -55,6 +59,9 @@ export const useUpdateSecretImport = () => {
queryClient.invalidateQueries(
secretImportKeys.getSecretImportSecrets({ environment, path, projectId })
);
queryClient.invalidateQueries(
dashboardKeys.getDashboardSecrets({ projectId, secretPath: path ?? "/" })
);
}
});
};
@@ -93,6 +100,9 @@ export const useDeleteSecretImport = () => {
queryClient.invalidateQueries(
secretImportKeys.getSecretImportSecrets({ projectId, environment, path })
);
queryClient.invalidateQueries(
dashboardKeys.getDashboardSecrets({ projectId, secretPath: path ?? "/" })
);
}
});
};