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:
Mauricio Siu
2026-03-19 16:20:01 -06:00
parent bb56a0bae8
commit 3854dfaade
2 changed files with 5 additions and 5 deletions

View File

@@ -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) => {
</div>
<div className="flex justify-end">
<Button type="submit" isLoading={isLoading}>
<Button type="submit" isLoading={isPending}>
Save
</Button>
</div>

View File

@@ -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);