-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent-structure.js
83 lines (81 loc) · 2.33 KB
/
content-structure.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
81
82
83
import S from "@sanity/desk-tool/structure-builder"
import { orderableDocumentListDeskItem } from "@sanity/orderable-document-list"
import { IoIosContacts as PartnerIcon } from "react-icons/io"
import {
AiOutlineFolder as ProjectIcon,
// AiFillContacts as PartnerIcon,
AiOutlineTags as TagIcon,
AiOutlineTags as CategoryIcon,
AiOutlineOrderedList as RoleIcon,
AiOutlineHome as HomeIcon,
AiOutlineInfoCircle as AboutIcon,
AiOutlineCode as WorkIcon,
AiOutlineContacts as ContactIcon,
AiOutlineControl as SettingsIcon,
} from "react-icons/ai"
// const singles = (listItem) =>
// !["home", "about", "work", "contact", "settings"].includes(listItem.getId())
export default () =>
S.list()
.title("Content")
// singles
.items([
S.listItem()
.title("Home")
.icon(HomeIcon)
.child(S.editor().id("home").schemaType("home").documentId("home")),
S.listItem()
.title("About")
.icon(AboutIcon)
.child(S.editor().id("about").schemaType("about").documentId("about")),
S.listItem()
.title("Work")
.icon(WorkIcon)
.child(S.editor().id("work").schemaType("work").documentId("work")),
S.listItem()
.title("Contact")
.icon(ContactIcon)
.child(
S.editor().id("contact").schemaType("contact").documentId("contact")
),
S.divider(),
// collections
// ...S.documentTypeListItems().filter(singles),
orderableDocumentListDeskItem({
type: "project",
title: "Projects",
icon: ProjectIcon,
}),
orderableDocumentListDeskItem({
type: "partner",
title: "Partners",
icon: PartnerIcon,
}),
orderableDocumentListDeskItem({
type: "tag",
title: "Tags",
icon: TagIcon,
}),
orderableDocumentListDeskItem({
type: "category",
title: "Categories",
icon: CategoryIcon,
}),
orderableDocumentListDeskItem({
type: "role",
title: "Roles",
icon: RoleIcon,
}),
S.divider(),
// settings
S.listItem()
.title("Settings")
.icon(SettingsIcon)
.child(
S.editor()
.title("Settings")
.id("settings")
.schemaType("settings")
.documentId("settings")
),
])