refactor: centralize bundle filtering with filterOutBundles helper
Some checks failed
Build and Deploy / build (push) Has been cancelled
Some checks failed
Build and Deploy / build (push) Has been cancelled
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { MetadataRoute } from "next";
|
||||
import { getProducts } from "@/lib/saleor";
|
||||
import { getProducts, filterOutBundles } from "@/lib/saleor";
|
||||
import { SUPPORTED_LOCALES, type Locale } from "@/lib/i18n/locales";
|
||||
|
||||
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://dev.manoonoils.com";
|
||||
@@ -80,9 +80,7 @@ export default async function sitemap(): Promise<SitemapEntry[]> {
|
||||
},
|
||||
];
|
||||
|
||||
const filteredProducts = products.filter(
|
||||
(p: any) => !p.name.includes("2x Set") && !p.name.includes("3x Set")
|
||||
);
|
||||
const filteredProducts = filterOutBundles(products);
|
||||
|
||||
const productUrls: SitemapEntry[] = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user