UNPKG

fumadocs-openapi

Version:

Generate MDX docs for your OpenAPI spec

18 lines (16 loc) 584 B
import { useApiContext } from "../contexts/api.js"; import { useMemo } from "react"; //#region src/ui/client/storage-key.ts function useStorageKey() { const { storageKeyPrefix } = useApiContext().client; return useMemo(() => ({ of: (name) => getStorageKey(storageKeyPrefix, name), AuthField: (field) => getStorageKey(storageKeyPrefix, `auth-${field.original?.id ?? field.fieldName}`) }), [storageKeyPrefix]); } function getStorageKey(prefix = "fumadocs-openapi-", name) { return prefix + name; } //#endregion export { useStorageKey }; //# sourceMappingURL=storage-key.js.map