Fix a bunch of errors we had
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user