37 lines
1.3 KiB
TypeScript
37 lines
1.3 KiB
TypeScript
import {ListItemBuilder, StructureBuilder} from 'sanity/structure'
|
|
import defineStructure from '../utils/defineStructure'
|
|
|
|
const ONE = (S: StructureBuilder, type: string, id: string, label: string) =>
|
|
S.listItem()
|
|
.title(label)
|
|
.schemaType(type)
|
|
.child(S.editor().title(label).schemaType(type).documentId(id))
|
|
|
|
/**
|
|
* Storefront static pages (Hydrogen). Document IDs are fixed for GROQ.
|
|
*/
|
|
export default defineStructure<ListItemBuilder>((S) =>
|
|
S.listItem()
|
|
.title('Store pages (ABiiR)')
|
|
.id('abiirStorePagesRoot')
|
|
.child(
|
|
S.list()
|
|
.title('Store pages (ABiiR)')
|
|
.items([
|
|
ONE(S, 'abiirFaqPage', 'abiirFaqPage', 'FAQ'),
|
|
ONE(S, 'abiirShippingPage', 'abiirShippingPage', 'Shipping & Returns'),
|
|
ONE(S, 'abiirContactPage', 'abiirContactPage', 'Contact'),
|
|
ONE(S, 'abiirTrackOrderPage', 'abiirTrackOrderPage', 'Track my order'),
|
|
ONE(
|
|
S,
|
|
'abiirSkincareQuizPage',
|
|
'abiirSkincareQuizPage',
|
|
'Skincare quiz',
|
|
),
|
|
ONE(S, 'abiirPressPage', 'abiirPressPage', 'Press'),
|
|
ONE(S, 'abiirPrivacyPolicyPage', 'abiirPrivacyPolicyPage', 'Privacy policy'),
|
|
ONE(S, 'abiirTermsOfServicePage', 'abiirTermsOfServicePage', 'Terms of service'),
|
|
]),
|
|
),
|
|
)
|