Fix a bunch of errors we had

This commit is contained in:
2026-03-28 12:15:22 -05:00
parent b9c845cac1
commit 4c97c7fa17
43 changed files with 6003 additions and 8839 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -159,7 +159,7 @@ const SignIn = () => {
};
const handleVerifyEmail = async (
values: z.infer<typeof verifyEmailFormSchema>,
_values: z.infer<typeof verifyEmailFormSchema>,
) => {
const formData = new FormData();
formData.append('code', code);
@@ -194,7 +194,7 @@ const SignIn = () => {
<FormField
control={verifyEmailForm.control}
name='code'
render={({ field }) => (
render={({ field: _field }) => (
<FormItem>
<FormLabel className='text-xl'>Code</FormLabel>
<FormControl>

View File

@@ -1,4 +1,6 @@
import type { LandingPageContent } from '@/components/landing/content';
import { LandingPageBuilder } from '@/components/landing';
import { defaultLandingPageContent } from '@/components/landing/content';
import { RefreshRouteOnSave } from '@/components/payload/refresh-route-on-save';
import { getLandingPageContent } from '@/lib/payload/get-landing-page-content';
@@ -14,7 +16,13 @@ const Home = async ({ searchParams }: HomeProps) => {
const isPreview = Array.isArray(previewParam)
? previewParam.includes('true')
: previewParam === 'true';
const content = await getLandingPageContent(isPreview);
let content: LandingPageContent;
try {
content = await getLandingPageContent(isPreview);
} catch {
content = defaultLandingPageContent;
}
return (
<main className='flex min-h-screen flex-col'>

View File

@@ -10,9 +10,7 @@ type Args = {
params: Promise<{
segments: string[];
}>;
searchParams: Promise<{
[key: string]: string | string[];
}>;
searchParams: Promise<Record<string, string | string[]>>;
};
export const generateMetadata = ({

View File

@@ -10,9 +10,7 @@ type Args = {
params: Promise<{
segments: string[];
}>;
searchParams: Promise<{
[key: string]: string | string[];
}>;
searchParams: Promise<Record<string, string | string[]>>;
};
export const generateMetadata = ({

View File

@@ -16,7 +16,7 @@ type Args = {
children: React.ReactNode;
};
const serverFunction: ServerFunctionClient = async function (args) {
const serverFunction: ServerFunctionClient = async (args) => {
'use server';
return handleServerFunctions({
...args,

View File

@@ -7,14 +7,15 @@ import { getPayloadClient } from './get-payload';
export const getLandingPageContent = async (
isPreview = false,
): Promise<LandingPageContent> => {
noStore();
if (isPreview) {
noStore();
}
const payload = await getPayloadClient();
const landingPage = await (
payload as {
findGlobal: (args: { slug: string; draft?: boolean }) => Promise<unknown>;
}
).findGlobal({ slug: 'landing-page', draft: isPreview });
const landingPage = await payload.findGlobal({
slug: 'landing-page',
draft: isPreview,
});
return mergeLandingPageContent(landingPage as Partial<LandingPageContent>);
return mergeLandingPageContent(landingPage);
};

View File

@@ -1,4 +1,3 @@
/* tslint:disable */
/* eslint-disable */
/**
* This file was automatically generated by Payload.

View File

@@ -8,6 +8,7 @@ import { Users } from './payload/collections/users';
import { LandingPage } from './payload/globals/landing-page';
export default buildConfig({
serverURL: env.NEXT_PUBLIC_SITE_URL,
editor: lexicalEditor(),
collections: [Users],
globals: [LandingPage],

View File

@@ -11,7 +11,11 @@ export const LandingPage: GlobalConfig = {
},
admin: {
livePreview: {
url: '/?preview=true',
url: ({
payload,
}: {
payload: { config: { serverURL?: string | null } };
}) => `${payload.config.serverURL ?? ''}/?preview=true`,
breakpoints: [
{
label: 'Mobile',