open, interoperable sandbox platform for agents and humans 📦 ✨
pocketenv.io
claude-code
atproto
sandbox
openclaw
agent
1import { useMutation, useQuery } from "@tanstack/react-query";
2import {
3 getTailscaleAuthKey,
4 saveTailscaleAuthKey,
5} from "../api/tailscale-auth-key";
6
7export const useTailscaleAuthKeyQuery = (sandboxId: string) =>
8 useQuery({
9 queryKey: ["tailscale-auth-key", sandboxId],
10 queryFn: () => getTailscaleAuthKey(sandboxId),
11 enabled: !!sandboxId,
12 });
13
14export const useSaveTailscaleAuthKeyMutation = () =>
15 useMutation({
16 mutationFn: (variables: {
17 sandboxId: string;
18 authKey: string;
19 redacted: string;
20 }) =>
21 saveTailscaleAuthKey(
22 variables.sandboxId,
23 variables.authKey,
24 variables.redacted,
25 ),
26 });