This repository has been archived by the owner on Jun 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
deskStructure.js
80 lines (78 loc) · 2.3 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
73
74
75
76
77
78
79
80
import S from "@sanity/desk-tool/structure-builder"
import { MdInsertDriveFile } from "react-icons/lib/md"
const hiddenDocTypes = listItem =>
![
"homePage",
"workPage",
"bioPage",
"contactPage",
"work",
"logos",
"categories",
].includes(listItem.getId())
export default () =>
S.list()
.title("Content")
.items([
S.listItem()
.title("Published Work")
.child(
S.list()
.title("Published Work")
.items([
S.listItem()
.title("List of Work")
.schemaType("work")
.child(S.documentTypeList("work").title("List of Work")),
S.listItem()
.title("Categories")
.schemaType("categories")
.child(S.documentTypeList("categories").title("Categories")),
S.listItem()
.title("Publisher Logos")
.schemaType("logos")
.child(S.documentTypeList("logos").title("Publisher Logos")),
])
),
S.listItem()
.title("Website Pages")
.child(
S.list()
.title("Pages")
.items([
S.listItem()
.title("Home Page")
.icon(MdInsertDriveFile)
.child(
S.editor()
.schemaType("homePage")
.documentId("homePage")
),
S.listItem()
.title("Work Page")
.icon(MdInsertDriveFile)
.child(
S.editor()
.schemaType("workPage")
.documentId("workPage")
),
S.listItem()
.title("Bio Page")
.icon(MdInsertDriveFile)
.child(
S.editor()
.schemaType("bioPage")
.documentId("bioPage")
),
S.listItem()
.title("Contact Page")
.icon(MdInsertDriveFile)
.child(
S.editor()
.schemaType("contactPage")
.documentId("contactPage")
),
])
),
...S.documentTypeListItems().filter(hiddenDocTypes),
])