Skip to content

Commit

Permalink
Fix demo store search action url (#802)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocordova authored Apr 26, 2023
1 parent 53e6dbf commit a783b42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion templates/demo-store/app/lib/seo.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ function root({
shop: Shop;
url: Request['url'];
}): SeoConfig<Organization> {
const requestUrl = new URL(url);
return {
title: shop?.name,
titleTemplate: '%s | Hydrogen Demo Store',
Expand All @@ -53,7 +54,7 @@ function root({
url,
potentialAction: {
'@type': 'SearchAction',
target: `${url}search?q={search_term}`,
target: `${requestUrl.origin}/search?q={search_term}`,
query: "required name='search_term'",
},
},
Expand Down

0 comments on commit a783b42

Please sign in to comment.