Skip to content

Commit

Permalink
fix: use correct title path in recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvxd committed Dec 11, 2023
1 parent 61debc9 commit 60244ba
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion recipes/next/app/[...puckPath]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function generateMetadata({
const path = `/${puckPath.join("/")}`;

return {
title: getPage(path)?.root.title,
title: getPage(path)?.root.props.title,
};
}

Expand Down
2 changes: 1 addition & 1 deletion recipes/remix/app/routes/_index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const loader = async ({ params }: LoaderFunctionArgs) => {
};

export const meta: MetaFunction<typeof loader> = ({ data }) => {
const title = data?.puckData?.root?.title || "Page";
const title = data?.puckData?.root?.props?.title || "Page";

return [{ title }];
};
Expand Down
2 changes: 1 addition & 1 deletion recipes/remix/app/routes/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const loader = async ({ params }: LoaderFunctionArgs) => {
};

export const meta: MetaFunction<typeof loader> = ({ data }) => {
const title = data?.initialData?.root?.title || "Untitled page";
const title = data?.initialData?.root?.props?.title || "Untitled page";

return [{ title: `Editing: ${title}` }];
};
Expand Down

0 comments on commit 60244ba

Please sign in to comment.