Open History to see the last commit
1import type { EnvironmentId } from "@t3tools/contracts";
2import { Atom } from "effect/unstable/reactivity";
3
4import { appAtomRegistry } from "../rpc/atomRegistry";
5
6export const selectedSettingsEnvironmentIdAtom = Atom.make<EnvironmentId | null>(null).pipe(
7 Atom.keepAlive,
8 Atom.withLabel("web-selected-settings-environment-id"),
9);
10
11export function setSelectedSettingsEnvironmentId(environmentId: EnvironmentId): void {
12 appAtomRegistry.set(selectedSettingsEnvironmentIdAtom, environmentId);
13}