Skip to content

Commit ee24d58

Browse files
committed
add url to sublandingpage items
1 parent 0efa4cf commit ee24d58

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

tina/collections/shared/page/quick_navigation.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* @type {import('tinacms').TinaField}
33
*/
44
import { TinaField } from "tinacms";
5+
import url from "./url";
56

67
const quick_navigation: TinaField = {
78
type: "object",
@@ -33,12 +34,7 @@ const quick_navigation: TinaField = {
3334
label: "Title",
3435
required: true,
3536
},
36-
{
37-
type: "string",
38-
name: "url",
39-
label: "Url",
40-
required: true,
41-
},
37+
url,
4238
{
4339
type: "object",
4440
name: "links",

tina/collections/shared/page/sublandingpage.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import title from "./title";
99

1010
import { TinaField } from "tinacms";
1111
import titleline2 from "./titleline2";
12+
import url from "./url";
1213
const sublandingpageFields: TinaField[] = [
1314
{
1415
type: "string",
@@ -37,7 +38,7 @@ const sublandingpageFields: TinaField[] = [
3738
return { label: item?.title };
3839
},
3940
},
40-
fields: [title, titleline2, icon, color],
41+
fields: [title, titleline2, icon, color, url],
4142
defaultItem: () => {
4243
return {
4344
color: "#FFF",
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* @type {import('tinacms').TinaField}
3+
*/
4+
import { TinaField } from "tinacms";
5+
6+
let url: TinaField = {
7+
type: "string",
8+
name: "url",
9+
label: "Url",
10+
required: true,
11+
};
12+
export default url;

tina/tina-lock.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)