Skip to content

Commit

Permalink
Removed now unnecessary explicit sitemap version
Browse files Browse the repository at this point in the history
  • Loading branch information
rbshop committed Oct 18, 2024
1 parent 768be97 commit 215fd7d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/hydrogen/src/sitemap/sitemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ const SITEMAP_PREFIX = `<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">`;
const SITEMAP_SUFFIX = `</urlset>`;

const SITEMAP_STOREFRONT_API_VERSION = '2024-10';

type SITEMAP_INDEX_TYPE =
| 'pages'
| 'products'
Expand Down Expand Up @@ -58,9 +56,7 @@ export async function getSitemapIndex(
'A storefront client is required to generate a sitemap index',
);

const data = await storefront.query(SITEMAP_INDEX_QUERY, {
storefrontApiVersion: SITEMAP_STOREFRONT_API_VERSION,
});
const data = await storefront.query(SITEMAP_INDEX_QUERY);

if (!data) {
throw new Response('No data found', {status: 404});
Expand Down Expand Up @@ -168,7 +164,6 @@ export async function getSitemap(
variables: {
page: parseInt(params.page, 10),
},
storefrontApiVersion: SITEMAP_STOREFRONT_API_VERSION,
});

const baseUrl = new URL(request.url).origin;
Expand Down

0 comments on commit 215fd7d

Please sign in to comment.