fix build errors
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
tobias
2024-06-24 17:34:40 +02:00
parent 043470fe0c
commit cb0a2f77a8
7 changed files with 25 additions and 38 deletions

View File

@ -1,26 +0,0 @@
import deepMerge from 'deepmerge'
import type { Field } from 'payload/types'
import * as HiIcons from 'react-icons/hi2'
const iconOptions = Object.entries(HiIcons)
.filter(([key, value]) => typeof value === 'function')
.map(([key]) => ({
value: key,
label: key.replace(/([a-z])([A-Z])/g, '$1 $2')
}))
type IconField = (overrides?: Partial<Field>) => Field
const iconField: IconField = (overrides = {}) => {
return deepMerge<Field, Partial<Field>>(
{
type: 'select',
name: 'icon',
label: 'Icon',
options: iconOptions
},
overrides
)
}
export default iconField

View File

@ -74,7 +74,7 @@ const TextComponent: FC<TextComponentProps> = ({ children, format }) => {
const SerializedLink: React.FC<{
node: SerializedLexicalNode
locale: string
children: JSX.Element | null
children: React.JSX.Element | null
}> = ({ node, locale, children }) => {
const { doc, url, newTab, linkType } = node.fields as any
const document = doc?.value
@ -164,7 +164,7 @@ const LexicalContent: React.FC<{
</li>
)
case 'heading':
const HeadingTag = node.tag as keyof JSX.IntrinsicElements
const HeadingTag = node.tag as keyof React.JSX.IntrinsicElements
return (
<HeadingTag key={ix} {...attributes}>
{serializedChildren}

View File

@ -1,4 +1,4 @@
'use server'
/* 'use server'
import { SESSION_STRATEGY } from '@/lib/auth/config'
import { COLLECTION_SLUG_SESSIONS } from '@/payload/collections/config'
@ -16,3 +16,4 @@ export const revalidateUser = async (user: User, payload: Payload) => {
})
}
}
*/

View File

@ -1,7 +1,7 @@
import configPromise from '@payload-config'
import { getPayloadHMR as getPayloadInstance } from '@payloadcms/next/utilities'
import { headers as getHeaders } from 'next/headers'
import type { User } from '~/payload-types'
import type { User } from 'types/payload-types'
export async function getPayload(): ReturnType<typeof getPayloadInstance> {
return getPayloadInstance({ config: await configPromise })