You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Portfolio/src/utils/cv.ts

17 lines
423 B

import { readJson } from "fs-extra";
import path from "path";
import { readAndParseJsonFile } from "./json";
import { cache } from "react";
import CvProps, { CvPropsModel } from "@models/cv";
export const readCvJson = cache(
async (dataDirLocation: string): Promise<CvProps> => {
const cvJsonLocation = path.join(dataDirLocation, "cv.json");
return await readAndParseJsonFile(cvJsonLocation, CvPropsModel);
}
);