mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-12 06:55:19 +00:00
chore: update dependencies in pnpm-lock.yaml and package.json, including zod to version 4.3.6, @dokploy/trpc-openapi to version 0.0.13, and @trpc packages to version 11.10.0; refactor loading state handling in application components
This commit is contained in:
@@ -60,7 +60,7 @@ export const HandleDestinations = ({ destinationId }: Props) => {
|
||||
const { data: servers } = api.server.withSSHKey.useQuery();
|
||||
const { data: isCloud } = api.settings.isCloud.useQuery();
|
||||
|
||||
const { mutateAsync, isError, error, isLoading } = destinationId
|
||||
const { mutateAsync, isError, error, isPending } = destinationId
|
||||
? api.destination.update.useMutation()
|
||||
: api.destination.create.useMutation();
|
||||
|
||||
@@ -75,7 +75,7 @@ export const HandleDestinations = ({ destinationId }: Props) => {
|
||||
);
|
||||
const {
|
||||
mutateAsync: testConnection,
|
||||
isLoading: isLoadingConnection,
|
||||
isPending: isPendingConnection,
|
||||
error: connectionError,
|
||||
isError: isErrorConnection,
|
||||
} = api.destination.testConnection.useMutation();
|
||||
@@ -410,7 +410,7 @@ export const HandleDestinations = ({ destinationId }: Props) => {
|
||||
<Button
|
||||
type="button"
|
||||
variant={"secondary"}
|
||||
isLoading={isLoadingConnection}
|
||||
isLoading={isPendingConnection}
|
||||
onClick={async () => {
|
||||
await handleTestConnection(form.getValues("serverId"));
|
||||
}}
|
||||
@@ -420,7 +420,7 @@ export const HandleDestinations = ({ destinationId }: Props) => {
|
||||
</div>
|
||||
) : (
|
||||
<Button
|
||||
isLoading={isLoadingConnection}
|
||||
isLoading={isPendingConnection}
|
||||
type="button"
|
||||
variant="secondary"
|
||||
onClick={async () => {
|
||||
@@ -432,7 +432,7 @@ export const HandleDestinations = ({ destinationId }: Props) => {
|
||||
)}
|
||||
|
||||
<Button
|
||||
isLoading={isLoading}
|
||||
isLoading={isPending}
|
||||
form="hook-form-destination-add"
|
||||
type="submit"
|
||||
>
|
||||
|
||||
@@ -13,8 +13,8 @@ import { api } from "@/utils/api";
|
||||
import { HandleDestinations } from "./handle-destinations";
|
||||
|
||||
export const ShowDestinations = () => {
|
||||
const { data, isLoading, refetch } = api.destination.all.useQuery();
|
||||
const { mutateAsync, isLoading: isRemoving } =
|
||||
const { data, isPending, refetch } = api.destination.all.useQuery();
|
||||
const { mutateAsync, isPending: isRemoving } =
|
||||
api.destination.remove.useMutation();
|
||||
return (
|
||||
<div className="w-full">
|
||||
@@ -31,7 +31,7 @@ export const ShowDestinations = () => {
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-2 py-8 border-t">
|
||||
{isLoading ? (
|
||||
{isPending ? (
|
||||
<div className="flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground min-h-[25vh]">
|
||||
<span>Loading...</span>
|
||||
<Loader2 className="animate-spin size-4" />
|
||||
|
||||
Reference in New Issue
Block a user