Files
liam-portfolio/src/globals/home.ts
T
LiamPietralla d34a8474fc
Build and Push Container / Build App (pull_request) Successful in 1m54s
Build and Push Container / Build App (push) Successful in 2m0s
Build and Push Container / Publish App (pull_request) Skipped
Build and Push Container / Publish App (push) Skipped
format fix
2026-10-15 17:28:40 +11:00

66 lines
1.2 KiB
TypeScript

import { lucideOptions } from '@/lib/lucid-options'
import { revalidatePath } from 'next/cache'
import { GlobalConfig } from 'payload'
export const Home: GlobalConfig = {
slug: 'home',
access: {
read: () => true,
},
fields: [
{
name: 'mainLinks',
type: 'array',
required: true,
fields: [
{
name: 'title',
type: 'text',
required: true,
},
{
name: 'url',
type: 'text',
required: true,
},
{
name: 'icon',
type: 'select',
options: lucideOptions,
required: true,
},
],
},
{
name: 'popoverLinks',
type: 'array',
required: true,
fields: [
{
name: 'title',
type: 'text',
required: true,
},
{
name: 'url',
type: 'text',
required: true,
},
{
name: 'icon',
type: 'select',
options: lucideOptions,
required: true,
},
],
},
],
hooks: {
afterChange: [
async () => {
revalidatePath('/')
},
],
},
}