Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.icon(MdSettings)
.child(
S.editor()
.id('siteSettings')
.schemaType('siteSettings')
.documentId('siteSettings')
),
S.listItem()
.title('Blog posts')
.schemaType('post')
.child(S.documentTypeList('post').title('Blog posts')),
S.listItem()
.title('Authors')
.icon(MdPerson)
.schemaType('author')
.child(S.documentTypeList('author').title('Authors')),
S.listItem()
.title('Categories')
.schemaType('category')
.child(S.documentTypeList('category').title('Categories')),
// This returns an array of all the document types
// defined in schema.js. We filter out those that we have
// defined the structure above
...S.documentTypeListItems().filter(hiddenDocTypes)
])
child: () =>
S.documentTypeList('author')
.title('Developers')
.filter('_type == $type && role == $role')
.params({type: 'author', role: 'developer'})
.initialValueTemplates(S.initialValueTemplateItem('author-developer'))
}),
.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()))
])
.icon(MdSettings)
.child(
S.editor()
.id('config')
.schemaType('site-config')
.documentId('global-config')
),
S.listItem()
.title('Pages')
.icon(MdDashboard)
.schemaType('page')
.child(S.documentTypeList('page').title('Pages')),
S.listItem()
.title('Routes')
.schemaType('route')
.child(S.documentTypeList('route').title('Routes')),
S.listItem()
.title('Ads')
.schemaType('ad')
.child(S.documentTypeList('ad').title('Ads')),
S.listItem()
.title('People')
.schemaType('person')
.child(
S.documentTypeList('person')
.title('People')
.child(documentId =>
S.document()
.documentId(documentId)
.schemaType('person')
.views([S.view.form(), S.view.component(Preview)])
)