Template
Fix a bunch of errors we had
This commit is contained in:
1 parent
b9c845cac1
commit
4c97c7fa17
43 files changed
+6003
-8839
No files matched your search
@@ -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