-
Notifications
You must be signed in to change notification settings - Fork 0
/
sanity.config.ts
30 lines (27 loc) · 774 Bytes
/
sanity.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
'use client';
import { apiVersion, dataset, projectId } from '@/lib/sanity/env';
import { schema } from '@/lib/sanity/schemas';
import { structure } from '@/lib/sanity/structure';
import { visionTool } from '@sanity/vision';
import { defineConfig } from 'sanity';
import { iconPicker } from 'sanity-plugin-icon-picker';
import { structureTool } from 'sanity/structure';
export default defineConfig({
basePath: '/studio',
projectId,
dataset,
schema,
plugins: [
structureTool({ structure }),
visionTool({ defaultApiVersion: apiVersion }),
iconPicker(),
],
document: {
newDocumentOptions: (prev, { currentUser }) => {
if (!currentUser?.email?.includes('@some.engineering')) {
return [];
}
return prev;
},
},
});