Files
yaak/apps/yaak-client/hooks/useActiveEnvironmentVariables.ts
Gregory Schier 7314aedc71 Merge main into proxy branch (formatting and docs)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 12:09:59 -07:00

9 lines
377 B
TypeScript

import { useAtomValue } from "jotai";
import { activeEnvironmentAtom } from "./useActiveEnvironment";
import { useEnvironmentVariables } from "./useEnvironmentVariables";
export function useActiveEnvironmentVariables() {
const activeEnvironment = useAtomValue(activeEnvironmentAtom);
return useEnvironmentVariables(activeEnvironment?.id ?? null).map((v) => v.variable);
}