Skip to content

Commit

Permalink
Fix typo and expand getSeoMeta doc example (#2219)
Browse files Browse the repository at this point in the history
* Fix typo and expand getSeoMeta doc example

While `matches` is an array, the TS example treats it as an object

The upgrade docs included a more robust example of spreading all the
seo config, adding here as well

* Update packages/hydrogen/src/seo/getSeoMeta.example.tsx

---------

Co-authored-by: = <=>
Co-authored-by: Bret Little <bret.little@gmail.com>
  • Loading branch information
dvnrsn and blittle committed Jun 20, 2024
1 parent 54c2f7a commit 70e2da0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/hydrogen/src/seo/getSeoMeta.example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ export async function loader({context}: LoaderFunctionArgs) {

export const meta: MetaFunction<typeof loader> = ({data, matches}) => {
// Pass one or more arguments, preserving properties from parent routes
return getSeoMeta((matches as any).data.seo, data!.seo);
return getSeoMeta((matches as any)[0].data.seo, data!.seo);
};

0 comments on commit 70e2da0

Please sign in to comment.