mirror of
https://github.com/lux-tel/websites.git
synced 2026-10-30 20:31:36 +00:00
28 lines
700 B
TypeScript
28 lines
700 B
TypeScript
import { defineField } from 'sanity';
|
|
import type { SchemaFieldsType } from '../../types';
|
|
import { slugFieldDefinition } from '../basic/slug';
|
|
|
|
export const routeFields = [
|
|
defineField({
|
|
name: 'label',
|
|
type: 'string' as const,
|
|
title: 'Label',
|
|
group: 'route',
|
|
description: (
|
|
<p>
|
|
The label for links to this route.
|
|
<strong>
|
|
This is ONLY used for link labels. It is not rendered anywhere else and not used for SEO.
|
|
</strong>
|
|
</p>
|
|
),
|
|
validation: (Rule) => Rule.required(),
|
|
}),
|
|
defineField({
|
|
...slugFieldDefinition,
|
|
group: 'route',
|
|
}),
|
|
];
|
|
|
|
export type RouteFieldsSchemaType = SchemaFieldsType<typeof routeFields>;
|