mirror of
https://github.com/vercel/commerce.git
synced 2025-05-14 13:47:49 +00:00
16 lines
393 B
TypeScript
16 lines
393 B
TypeScript
import { createClient } from 'next-sanity'
|
|
import {
|
|
apiVersion,
|
|
dataset,
|
|
projectId,
|
|
revalidateSecret,
|
|
} from './sanity.api'
|
|
|
|
export const client = createClient({
|
|
projectId,
|
|
dataset,
|
|
apiVersion,
|
|
// If webhook revalidation is setup we want the freshest content, if not then it's best to use the speedy CDN
|
|
useCdn: revalidateSecret ? false : true,
|
|
perspective: 'published',
|
|
}) |