Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions apps/seven/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type { Route } from './+types/root';
import { flattenToAppURL } from '@plone/helpers';
import type PloneClient from '@plone/client';
import config from '@plone/registry';
import type { Content } from '@plone/types';
import {
getAPIResourceWithAuth,
installServerMiddleware,
Expand Down Expand Up @@ -34,7 +35,16 @@ export async function loader({ params, request }: Route.LoaderArgs) {

const rootLoaderDataUtilities = config.getUtilities({
type: 'rootLoaderData',
});
}) as Array<{
method: (args: {
cli: PloneClient;
content: Content;
request: typeof request;
path: string;
params: typeof params;
locale: string;
}) => Promise<{ status: number; data: unknown }>;
}>;

try {
const [content, site] = await Promise.all([
Expand All @@ -44,7 +54,14 @@ export async function loader({ params, request }: Route.LoaderArgs) {

const rootLoaderDataUtilitiesData = await Promise.all([
...rootLoaderDataUtilities.map((utility) =>
utility.method({ cli, content, request, path, params, locale }),
utility.method({
cli,
content: content.data,
request,
path,
params,
locale,
}),
),
]);

Expand Down
1 change: 1 addition & 0 deletions apps/seven/news/+fixrootloadertype.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed root loader type. @pnicolli
Loading