This repository has been archived by the owner on Apr 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 142
/
deskStructure.js
72 lines (70 loc) · 2.1 KB
/
deskStructure.js
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import S from '@sanity/desk-tool/structure-builder'
import { MdBusiness, MdSettings } from 'react-icons/md'
import { FaFile } from 'react-icons/fa'
const hiddenTypes = ['category', 'companyInfo', 'page', 'person', 'post', 'project', 'siteSettings']
export default () =>
S.list()
.title('Content')
.items([
S.listItem()
.title('Site Settings')
.child(
S.editor()
.id('siteSettings')
.schemaType('siteSettings')
.documentId('siteSettings')
)
.icon(MdSettings),
S.listItem()
.title('Company Info')
.child(
S.editor()
.id('companyInfo')
.schemaType('companyInfo')
.documentId('companyInfo')
)
.icon(MdBusiness),
S.listItem()
.title('Projects')
.schemaType('project')
.child(S.documentTypeList('project')),
S.listItem()
.title('Blog posts')
.schemaType('post')
.child(S.documentTypeList('post').title('Blog posts')),
S.listItem()
.title('Pages')
.child(
S.list()
.title('Pages')
.items([
S.listItem()
.title('About')
.child(
S.editor()
.id('aboutPage')
.schemaType('page')
.documentId('about')
)
.icon(FaFile),
S.listItem()
.title('Contact')
.child(
S.editor()
.id('contactPage')
.schemaType('page')
.documentId('contact')
)
.icon(FaFile)
])
),
S.listItem()
.title('People')
.schemaType('person')
.child(S.documentTypeList('person').title('People')),
S.listItem()
.title('Categories')
.schemaType('category')
.child(S.documentTypeList('category').title('Categories')),
...S.documentTypeListItems().filter(listItem => !hiddenTypes.includes(listItem.getId()))
])