Skip to content

Commit d3232b9

Browse files
templates: bump for v3.4.0 (#9780)
Automated bump of templates for v3.4.0 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 28c6b2a commit d3232b9

File tree

22 files changed

+155
-78
lines changed

22 files changed

+155
-78
lines changed

templates/with-postgres/src/migrations/20241205_040211_initial.json renamed to templates/with-postgres/src/migrations/20241205_211431_initial.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id": "6ff63df3-bd96-4bc0-8d4b-1b0e6cc63711",
2+
"id": "99a9cc07-6ed3-4eeb-bc7d-a20cc21ec135",
33
"prevId": "00000000-0000-0000-0000-000000000000",
44
"version": "7",
55
"dialect": "postgresql",
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import * as migration_20241205_040211_initial from './20241205_040211_initial'
1+
import * as migration_20241205_211431_initial from './20241205_211431_initial'
22

33
export const migrations = [
44
{
5-
up: migration_20241205_040211_initial.up,
6-
down: migration_20241205_040211_initial.down,
7-
name: '20241205_040211_initial',
5+
up: migration_20241205_211431_initial.up,
6+
down: migration_20241205_211431_initial.down,
7+
name: '20241205_211431_initial',
88
},
99
]

templates/with-vercel-postgres/src/migrations/20241205_040146_initial.json renamed to templates/with-vercel-postgres/src/migrations/20241205_211405_initial.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id": "3b1d2937-d942-42f0-9738-5e8c48c205de",
2+
"id": "caad9ebf-d475-40cd-930e-059daf04fde8",
33
"prevId": "00000000-0000-0000-0000-000000000000",
44
"version": "7",
55
"dialect": "postgresql",
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import * as migration_20241205_040146_initial from './20241205_040146_initial'
1+
import * as migration_20241205_211405_initial from './20241205_211405_initial'
22

33
export const migrations = [
44
{
5-
up: migration_20241205_040146_initial.up,
6-
down: migration_20241205_040146_initial.down,
7-
name: '20241205_040146_initial',
5+
up: migration_20241205_211405_initial.up,
6+
down: migration_20241205_211405_initial.down,
7+
name: '20241205_211405_initial',
88
},
99
]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
'use client'
2+
import { Header } from '@/payload-types'
3+
import { RowLabelProps, useRowLabel } from '@payloadcms/ui'
4+
5+
export const RowLabel: React.FC<RowLabelProps> = (props) => {
6+
const data = useRowLabel<NonNullable<Header['navItems']>[number]>()
7+
8+
const label = data?.data?.link?.label
9+
? `Nav item ${data.rowNumber !== undefined ? data.rowNumber + 1 : ''}: ${data?.data?.link?.label}`
10+
: 'Row'
11+
12+
return <div>{label}</div>
13+
}

templates/with-vercel-website/src/Footer/config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ export const Footer: GlobalConfig = {
1818
}),
1919
],
2020
maxRows: 6,
21+
admin: {
22+
initCollapsed: true,
23+
components: {
24+
RowLabel: '@/Footer/RowLabel#RowLabel',
25+
},
26+
},
2127
},
2228
],
2329
hooks: {
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
'use client'
2+
import { Header } from '@/payload-types'
3+
import { RowLabelProps, useRowLabel } from '@payloadcms/ui'
4+
5+
export const RowLabel: React.FC<RowLabelProps> = (props) => {
6+
const data = useRowLabel<NonNullable<Header['navItems']>[number]>()
7+
8+
const label = data?.data?.link?.label
9+
? `Nav item ${data.rowNumber !== undefined ? data.rowNumber + 1 : ''}: ${data?.data?.link?.label}`
10+
: 'Row'
11+
12+
return <div>{label}</div>
13+
}

templates/with-vercel-website/src/Header/config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ export const Header: GlobalConfig = {
1818
}),
1919
],
2020
maxRows: 6,
21+
admin: {
22+
initCollapsed: true,
23+
components: {
24+
RowLabel: '@/Header/RowLabel#RowLabel',
25+
},
26+
},
2127
},
2228
],
2329
hooks: {

0 commit comments

Comments
 (0)