Files
nathannlu-ComfyUI-Cloud/js/store.js
T
2024-03-13 13:10:20 -07:00

24 lines
347 B
JavaScript

const LOCAL_STORAGE_KEY = "comfy_cloud_store"
export function getData() {
const data = localStorage.getItem(LOCAL_STORAGE_KEY);
if (!data) {
return {
apiKey: "",
};
}
return {
...JSON.parse(data),
};
}
export function setData(data) {
localStorage.setItem(
LOCAL_STORAGE_KEY,
JSON.stringify(data),
);
}