mirror of
https://github.com/vercel/commerce.git
synced 2025-05-15 05:56:59 +00:00
15 lines
430 B
TypeScript
15 lines
430 B
TypeScript
import { createClient } from "next-sanity";
|
|
import { cache } from 'react';
|
|
|
|
export const projectId = process.env.NEXT_PUBLIC_SANITY_PROJECT_ID!;
|
|
export const dataset = process.env.NEXT_PUBLIC_SANITY_DATASET!;
|
|
const apiVersion = process.env.NEXT_PUBLIC_SANITY_API_VERSION!;
|
|
|
|
export const client = createClient({
|
|
projectId,
|
|
dataset,
|
|
apiVersion,
|
|
useCdn: true,
|
|
});
|
|
|
|
export const clientFetch = cache(client.fetch.bind(client)); |