36d922fbda
The client now warns against missing `apiVersion` ([docs](https://www.sanity.io/docs/api-versioning)). This PR adds the config for using the latest API version. There shouldn't be breaking changes in this app. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes
11 lines
616 B
JavaScript
11 lines
616 B
JavaScript
export const sanityConfig = {
|
|
// Find your project ID and dataset in `sanity.json` in your studio project
|
|
dataset: process.env.NEXT_PUBLIC_SANITY_DATASET || 'production',
|
|
projectId: process.env.NEXT_PUBLIC_SANITY_PROJECT_ID,
|
|
useCdn: process.env.NODE_ENV === 'production',
|
|
// useCdn == true gives fast, cheap responses using a globally distributed cache.
|
|
// Set this to false if your application require the freshest possible
|
|
// data always (potentially slightly slower and a bit more expensive).
|
|
apiVersion: '2021-03-25',
|
|
// see https://www.sanity.io/docs/api-versioning for how versioning works
|
|
}
|