mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-17 17:35:17 +00:00
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.
This commit is contained in:
+2
-2
@@ -91,7 +91,7 @@ interface Props {
|
|||||||
export const ShowExternalLibsqlCredentials = ({ libsqlId }: Props) => {
|
export const ShowExternalLibsqlCredentials = ({ libsqlId }: Props) => {
|
||||||
const { data: ip } = api.settings.getIp.useQuery();
|
const { data: ip } = api.settings.getIp.useQuery();
|
||||||
const { data, refetch } = api.libsql.one.useQuery({ libsqlId });
|
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 [connectionUrl, setConnectionUrl] = useState("");
|
||||||
const [connectionGRPCUrl, setGRPCConnectionUrl] = useState("");
|
const [connectionGRPCUrl, setGRPCConnectionUrl] = useState("");
|
||||||
const getIp = data?.server?.ipAddress || ip;
|
const getIp = data?.server?.ipAddress || ip;
|
||||||
@@ -288,7 +288,7 @@ export const ShowExternalLibsqlCredentials = ({ libsqlId }: Props) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex justify-end">
|
<div className="flex justify-end">
|
||||||
<Button type="submit" isLoading={isLoading}>
|
<Button type="submit" isLoading={isPending}>
|
||||||
Save
|
Save
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -28,13 +28,13 @@ export const ShowGeneralLibsql = ({ libsqlId }: Props) => {
|
|||||||
{ enabled: !!libsqlId },
|
{ enabled: !!libsqlId },
|
||||||
);
|
);
|
||||||
|
|
||||||
const { mutateAsync: reload, isLoading: isReloading } =
|
const { mutateAsync: reload, isPending: isReloading } =
|
||||||
api.libsql.reload.useMutation();
|
api.libsql.reload.useMutation();
|
||||||
|
|
||||||
const { mutateAsync: start, isLoading: isStarting } =
|
const { mutateAsync: start, isPending: isStarting } =
|
||||||
api.libsql.start.useMutation();
|
api.libsql.start.useMutation();
|
||||||
|
|
||||||
const { mutateAsync: stop, isLoading: isStopping } =
|
const { mutateAsync: stop, isPending: isStopping } =
|
||||||
api.libsql.stop.useMutation();
|
api.libsql.stop.useMutation();
|
||||||
|
|
||||||
const [isDrawerOpen, setIsDrawerOpen] = useState(false);
|
const [isDrawerOpen, setIsDrawerOpen] = useState(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user