Added bracketSpacing into prettier (#627)

This commit is contained in:
yuri-sakharov
2025-11-27 13:27:16 +02:00
committed by GitHub
parent 3f623458b3
commit 1129651e6c
10 changed files with 155 additions and 144 deletions
@@ -130,8 +130,8 @@ export const InstallReleaseChartModal = ({
});
// Confirm method (install)
const setReleaseVersionMutation = useMutation(
{mutationKey:[
const setReleaseVersionMutation = useMutation({
mutationKey: [
"setVersion",
namespace,
releaseName,
@@ -140,7 +140,7 @@ export const InstallReleaseChartModal = ({
selectedCluster,
chartAddress,
],
mutationFn:async () => {
mutationFn: async () => {
setInstallError("");
const formData = new FormData();
formData.append("preview", "false");
@@ -161,21 +161,20 @@ export const InstallReleaseChartModal = ({
);
return data;
},
onSuccess: async (response) => {
onClose();
setSelectedVersionData({ version: "", urls: [] }); //cleanup
navigate(
`/${
namespace ? namespace : "default"
}/${releaseName}/installed/revision/${response.version}`
);
window.location.reload();
},
onError: (error) => {
setInstallError((error as Error)?.message || "Failed to update");
},
}
);
onSuccess: async (response) => {
onClose();
setSelectedVersionData({ version: "", urls: [] }); //cleanup
navigate(
`/${
namespace ? namespace : "default"
}/${releaseName}/installed/revision/${response.version}`
);
window.location.reload();
},
onError: (error) => {
setInstallError((error as Error)?.message || "Failed to update");
},
});
return (
<Modal
@@ -112,8 +112,8 @@ export const InstallRepoChartModal = ({
});
// Confirm method (install)
const setReleaseVersionMutation = useMutation(
{mutationKey:[
const setReleaseVersionMutation = useMutation({
mutationKey: [
"setVersion",
namespace,
releaseName,
@@ -122,7 +122,7 @@ export const InstallRepoChartModal = ({
selectedCluster,
chartAddress,
],
mutationFn:async () => {
mutationFn: async () => {
setInstallError("");
const formData = new FormData();
formData.append("preview", "false");
@@ -140,17 +140,14 @@ export const InstallRepoChartModal = ({
return data;
},
onSuccess: async (response) => {
onClose();
navigate(
`/${response.namespace}/${response.name}/installed/revision/1`
);
},
onError: (error) => {
setInstallError((error as Error)?.message || "Failed to update");
},
}
);
onSuccess: async (response) => {
onClose();
navigate(`/${response.namespace}/${response.name}/installed/revision/1`);
},
onError: (error) => {
setInstallError((error as Error)?.message || "Failed to update");
},
});
return (
<Modal
@@ -458,20 +458,19 @@ const Uninstall = () => {
enabled: isOpen,
});
const uninstallMutation = useMutation(
{mutationKey:["uninstall", namespace, chart],
mutationFn:() =>
const uninstallMutation = useMutation({
mutationKey: ["uninstall", namespace, chart],
mutationFn: () =>
apiService.fetchWithDefaults(
"/api/helm/releases/" + namespace + "/" + chart,
{
method: "delete",
}
),
onSuccess: () => {
window.location.href = "/";
},
}
);
onSuccess: () => {
window.location.href = "/";
},
});
const uninstallTitle = (
<div className="font-semibold text-lg">
Uninstall <span className="text-red-500">{chart}</span> from namespace{" "}