-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathsanity.config.ts
More file actions
35 lines (31 loc) · 891 Bytes
/
Copy pathsanity.config.ts
File metadata and controls
35 lines (31 loc) · 891 Bytes
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
31
32
33
34
35
import { visionTool } from '@sanity/vision';
import { defineConfig } from 'sanity';
import { structureTool } from 'sanity/structure';
import { sanityClient } from 'sanity:client';
import { Logo } from './desk/logo';
import { schemas } from './schemas';
import { myTheme } from './theme';
const { projectId, dataset } = sanityClient.config();
if (!projectId || !dataset)
throw new Error(
'Both projectId and dataset must be set in order for the Sanity admin dashboard to properly function',
);
const config = defineConfig({
name: 'lokkeestudios',
title: 'LOKKEE STUDIOS',
projectId,
dataset,
icon: Logo,
plugins: [structureTool(), visionTool()],
tools: (prev) => {
if (import.meta.env.DEV) {
return prev;
}
return prev.filter((tool) => tool.name !== 'vision');
},
schema: {
types: schemas,
},
theme: myTheme,
});
export default config;