From 3854dfaadeac5efa514fb3acb228e222994d070f Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Thu, 19 Mar 2026 16:20:01 -0600 Subject: [PATCH] refactor(libsql): rename loading states in mutation hooks - Updated mutation hooks in the ShowExternalLibsqlCredentials and ShowGeneralLibsql components to use 'isPending' instead of 'isLoading' for better clarity in loading state representation. - Adjusted button loading states accordingly to reflect the new naming convention. --- .../libsql/general/show-external-libsql-credentials.tsx | 4 ++-- .../dashboard/libsql/general/show-general-libsql.tsx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/dokploy/components/dashboard/libsql/general/show-external-libsql-credentials.tsx b/apps/dokploy/components/dashboard/libsql/general/show-external-libsql-credentials.tsx index d3e8a4b61..dbfc3fcf4 100644 --- a/apps/dokploy/components/dashboard/libsql/general/show-external-libsql-credentials.tsx +++ b/apps/dokploy/components/dashboard/libsql/general/show-external-libsql-credentials.tsx @@ -91,7 +91,7 @@ interface Props { export const ShowExternalLibsqlCredentials = ({ libsqlId }: Props) => { const { data: ip } = api.settings.getIp.useQuery(); const { data, refetch } = api.libsql.one.useQuery({ libsqlId }); - const { mutateAsync, isLoading } = api.libsql.saveExternalPorts.useMutation(); + const { mutateAsync, isPending } = api.libsql.saveExternalPorts.useMutation(); const [connectionUrl, setConnectionUrl] = useState(""); const [connectionGRPCUrl, setGRPCConnectionUrl] = useState(""); const getIp = data?.server?.ipAddress || ip; @@ -288,7 +288,7 @@ export const ShowExternalLibsqlCredentials = ({ libsqlId }: Props) => {
-
diff --git a/apps/dokploy/components/dashboard/libsql/general/show-general-libsql.tsx b/apps/dokploy/components/dashboard/libsql/general/show-general-libsql.tsx index f905d0d77..1727bb2b1 100644 --- a/apps/dokploy/components/dashboard/libsql/general/show-general-libsql.tsx +++ b/apps/dokploy/components/dashboard/libsql/general/show-general-libsql.tsx @@ -28,13 +28,13 @@ export const ShowGeneralLibsql = ({ libsqlId }: Props) => { { enabled: !!libsqlId }, ); - const { mutateAsync: reload, isLoading: isReloading } = + const { mutateAsync: reload, isPending: isReloading } = api.libsql.reload.useMutation(); - const { mutateAsync: start, isLoading: isStarting } = + const { mutateAsync: start, isPending: isStarting } = api.libsql.start.useMutation(); - const { mutateAsync: stop, isLoading: isStopping } = + const { mutateAsync: stop, isPending: isStopping } = api.libsql.stop.useMutation(); const [isDrawerOpen, setIsDrawerOpen] = useState(false);