silverwolf-x's picture
download
raw
1.03 kB
/**
* As this file is reused in several other files, try to keep it lean and small.
* Importing other npm packages here could lead to needlessly increasing the client bundle size, or end up in a server-only function that don't need it.
*/
function assertValue<T>(v: T | undefined, errorMessage: string): T {
if (v === undefined) {
throw new Error(errorMessage);
}
return v;
}
export const dataset = assertValue(
process.env.NEXT_PUBLIC_SANITY_DATASET,
"Missing environment variable: NEXT_PUBLIC_SANITY_DATASET",
);
export const projectId = assertValue(
process.env.NEXT_PUBLIC_SANITY_PROJECT_ID,
"Missing environment variable: NEXT_PUBLIC_SANITY_PROJECT_ID",
);
/**
* see https://www.sanity.io/docs/api-versioning for how versioning works
*/
export const apiVersion =
process.env.NEXT_PUBLIC_SANITY_API_VERSION || "2024-02-28";
/**
* Used to configure edit intent links, for Presentation Mode, as well as to configure where the Studio is mounted in the router.
*/
export const studioUrl = "/studio";

Xet Storage Details

Size:
1.03 kB
·
Xet hash:
8b95e573344724f80b58062be80786524c3b0840875f88cc54bdf8fb1860ee90

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.