Skip to content

Commit

Permalink
Warn that the seo component is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
blittle committed Apr 11, 2024
1 parent 3aaacde commit 433aca3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/calm-ladybugs-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/hydrogen': patch
---

Warn when using the deprecated Seo component
4 changes: 4 additions & 0 deletions packages/hydrogen/src/seo/seo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ export function Seo({debug}: SeoProps) {
const matches = useMatches();
const location = useLocation();

console.warn(
'The `Seo` component is deprecated. Use `getSeoMeta` instead.\n See: https://shopify.dev/docs/api/hydrogen/2024-01/utilities/getseometa',
);

// Capture the seo and jsonLd configs from the route matches
const seoConfig = useMemo(() => {
return (
Expand Down

0 comments on commit 433aca3

Please sign in to comment.