14 lines
476 B
TypeScript
14 lines
476 B
TypeScript
import { apiVersion, dataset, projectId, useCdn } from 'lib/sanity.api'
|
|
import { createClient } from 'next-sanity'
|
|
|
|
const client = createClient({
|
|
projectId,
|
|
dataset,
|
|
apiVersion, // https://www.sanity.io/docs/api-versioning
|
|
useCdn: true, // if you're using ISR or only static generation at build time then you can set this to `false` to guarantee no stale content
|
|
token: process.env.SANITY_API_READ_TOKEN,
|
|
ignoreBrowserTokenWarning: true,
|
|
})
|
|
|
|
export default client
|