refactor(multi-server): fix deploy on docker compose

This commit is contained in:
Mauricio Siu
2024-09-13 01:03:38 -06:00
parent 0bd0da2ee4
commit c412dabc54
12 changed files with 141 additions and 93 deletions

View File

@@ -46,16 +46,15 @@ export const SetupServer = ({ serverId }: Props) => {
{ serverId },
{
enabled: !!serverId,
refetchInterval: 1000,
},
);
const { mutateAsync } = api.server.setup.useMutation({
// onMutate: async (variables) => {
// console.log("Running....");
// utils.deployment.allByServer.invalidate({ serverId: variables.serverId });
// // refetch();
// },
const { mutateAsync, isLoading } = api.server.setup.useMutation({
onMutate: async (variables) => {
console.log("Running....");
refetch();
// refetch();
},
});
return (
@@ -108,7 +107,7 @@ export const SetupServer = ({ serverId }: Props) => {
});
}}
>
<Button>Setup Server</Button>
<Button isLoading={isLoading}>Setup Server</Button>
</DialogAction>
</div>
</CardHeader>