Disable mset for now

This commit is contained in:
dylan
2023-05-14 13:54:52 -07:00
parent 7b04080e9e
commit a6d093d728
4 changed files with 15 additions and 10 deletions

View File

@@ -2,7 +2,8 @@ import { path } from "./deps.ts";
import initialCart from "./initialCart.json" assert { type: "json" };
import { Sheet } from "./sheet.ts";
let cart = initialCart as Array<Sheet>;
let staticCart = initialCart as Array<Sheet>;
let cart: Array<Sheet> = JSON.parse(JSON.stringify(staticCart));
const virtualPathToRealPath = (virtualFname: string) => {
const realPath = path.join(".", "carts", ...virtualFname.split("/"));
@@ -14,7 +15,9 @@ export const saveCart = async (fname: string) => {
}
export const loadCart = async (fname: string) => {
cart = JSON.parse(await Deno.readTextFile(virtualPathToRealPath(fname+".fx")));
const json = await Deno.readTextFile(virtualPathToRealPath(fname+".fx"));
staticCart = JSON.parse(json);
cart = JSON.parse(json);
}
export const getCart = () => {