mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
fix(edge-stack): revert useEffect, to call matchRegistry less often [BE-11501] (#239)
This commit is contained in:
parent
94fda6a720
commit
117e3500ae
2 changed files with 4 additions and 10 deletions
|
@ -1,6 +1,5 @@
|
|||
import { useMutation } from '@tanstack/react-query';
|
||||
|
||||
import { withGlobalError } from '@/react-tools/react-query';
|
||||
import { RegistryId } from '@/react/portainer/registries/types/registry';
|
||||
import axios, {
|
||||
json2formData,
|
||||
|
@ -10,9 +9,10 @@ import axios, {
|
|||
import { buildUrl } from './buildUrl';
|
||||
|
||||
export function useParseRegistries() {
|
||||
return useMutation(parseRegistries, {
|
||||
...withGlobalError('Failed parsing registries'),
|
||||
});
|
||||
return useMutation(
|
||||
parseRegistries
|
||||
// handle errors in the calling function (notifyError vs setting form errors in validation)
|
||||
);
|
||||
}
|
||||
|
||||
export async function parseRegistries({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue