Everything seems to be working with better UI for page editting

This commit is contained in:
2026-03-27 04:29:45 -05:00
parent 482d2d6c97
commit 57bcb2474f
12 changed files with 1245 additions and 135 deletions
@@ -1,21 +1,20 @@
import type { LandingPageContent } from '@/components/landing/content';
import { cache } from 'react';
import { unstable_noStore as noStore } from 'next/cache';
import { mergeLandingPageContent } from '@/components/landing/content';
import { getPayloadClient } from './get-payload';
export const getLandingPageContent = cache(
async (isPreview = false): Promise<LandingPageContent> => {
const payload = await getPayloadClient();
const landingPage = await (
payload as {
findGlobal: (args: {
slug: string;
draft?: boolean;
}) => Promise<unknown>;
}
).findGlobal({ slug: 'landing-page', draft: isPreview });
export const getLandingPageContent = async (
isPreview = false,
): Promise<LandingPageContent> => {
noStore();
return mergeLandingPageContent(landingPage as Partial<LandingPageContent>);
},
);
const payload = await getPayloadClient();
const landingPage = await (
payload as {
findGlobal: (args: { slug: string; draft?: boolean }) => Promise<unknown>;
}
).findGlobal({ slug: 'landing-page', draft: isPreview });
return mergeLandingPageContent(landingPage as Partial<LandingPageContent>);
};