refactor: centralize bundle filtering with filterOutBundles helper
Some checks failed
Build and Deploy / build (push) Has been cancelled

This commit is contained in:
Unchained
2026-03-24 20:18:06 +02:00
parent bfce7dcca0
commit 3d8a77dafa
6 changed files with 18 additions and 19 deletions

View File

@@ -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[] = [];