diff --git a/app/sitemap.ts b/app/sitemap.ts index 4eb839f..b45623a 100644 --- a/app/sitemap.ts +++ b/app/sitemap.ts @@ -39,7 +39,6 @@ export default function sitemap(): MetadataRoute.Sitemap { priority: route === '' ? 1 : 0.8, })); - // Dynamiczne produkty const products = getProducts(); const productRoutes = products.map((product) => ({ url: `${baseUrl}/sklep/${product.slug}`, @@ -48,16 +47,14 @@ export default function sitemap(): MetadataRoute.Sitemap { priority: 0.8, })); - // Dynamiczne artykuły na blogu const posts = getPosts(); const postRoutes = posts.map((post) => ({ url: `${baseUrl}/blog/${post.slug}`, - lastModified: post.date, // Używamy daty publikacji jako lastModified + lastModified: post.date, changeFrequency: 'monthly' as const, priority: 0.6, })); - // Dynamiczne strony miast const cityRoutes = dolnySlaskCities.map((city) => ({ url: `${baseUrl}/klimatyzacja/${city.slug}`, lastModified: new Date().toISOString(), diff --git a/content/faq.ts b/content/faq.ts index cea0a79..fe85d59 100644 --- a/content/faq.ts +++ b/content/faq.ts @@ -6,7 +6,6 @@ export interface FaqItem { } export const faqData: FaqItem[] = [ - // Klimatyzacja { id: 'klimatyzacja-moc', question: 'Jak dobrać odpowiednią moc klimatyzatora?', diff --git a/content/pricing.ts b/content/pricing.ts index f21435d..d0939d0 100644 --- a/content/pricing.ts +++ b/content/pricing.ts @@ -2,8 +2,8 @@ export interface PricingItem { id: string; name: string; priceNet: number; - priceGrossPrivate: number; // 8% VAT - priceGrossCompany: number; // 23% VAT + priceGrossPrivate: number; + priceGrossCompany: number; category: 'split' | 'multisplit' | 'additional'; } diff --git a/content/process.ts b/content/process.ts index 858c5d5..737b239 100644 --- a/content/process.ts +++ b/content/process.ts @@ -1,6 +1,5 @@ import { ProcessStep } from "@/types/types"; -// MOCK export const mainProcessSteps: ProcessStep[] = [ { number: 1, diff --git a/content/product-variants.ts b/content/product-variants.ts index bd79d6f..9143f50 100644 --- a/content/product-variants.ts +++ b/content/product-variants.ts @@ -21,7 +21,6 @@ export function getProductVariants(slug: string): ProductVariants | null { const currentProduct = products.find(p => p.slug === slug); if (!currentProduct) return null; - // Extract series from SKU (e.g., GREE-PULAR-PU09S -> GREE-PULAR) const skuParts = currentProduct.sku.split('-'); if (skuParts.length < 2) return null; const series = skuParts.slice(0, -1).join('-'); @@ -31,7 +30,6 @@ export function getProductVariants(slug: string): ProductVariants | null { const currentMoc = currentProduct.specs['Moc chłodnicza'] || ''; const currentWykończenie = currentProduct.specs['Wykończenie'] || ''; - // Moce: same series, same wykończenie const moceProducts = seriesProducts.filter(p => (p.specs['Wykończenie'] || '') === currentWykończenie); const moce = moceProducts .filter(p => p.specs['Moc chłodnicza'] && p.price) @@ -46,7 +44,6 @@ export function getProductVariants(slug: string): ProductVariants | null { }) .sort((a, b) => (a.moc_float || 0) - (b.moc_float || 0)); - // Wykończenia: same series, same moc const wykończeniaProducts = seriesProducts.filter(p => (p.specs['Moc chłodnicza'] || '') === currentMoc); let wykończenia = wykończeniaProducts .filter(p => p.specs['Wykończenie'] && p.price) @@ -56,7 +53,7 @@ export function getProductVariants(slug: string): ProductVariants | null { cena: p.price as number, })); - // If there's only 1 finish available in the entire series, don't show the variants selector + const allFinishesInSeries = new Set(seriesProducts.map(p => p.specs['Wykończenie'] || '').filter(Boolean)); if (allFinishesInSeries.size <= 1) { wykończenia = []; diff --git a/content/testimonials.ts b/content/testimonials.ts index db955f1..0bd66e4 100644 --- a/content/testimonials.ts +++ b/content/testimonials.ts @@ -1,6 +1,6 @@ import { Testimonial } from "@/types/types"; -// MOCK + export const testimonials: Testimonial[] = [ { name: "Mariusz Wójcik", diff --git a/lib/consent-store.ts b/lib/consent-store.ts index 3c6087e..b1f6983 100644 --- a/lib/consent-store.ts +++ b/lib/consent-store.ts @@ -31,7 +31,7 @@ export const useConsentStore = create((set) => ({ if (typeof window !== 'undefined') { let stored = localStorage.getItem(CONSENT_KEY); - // Migration logic + if (!stored) { const oldStored = localStorage.getItem(OLD_CONSENT_KEY); if (oldStored) { @@ -47,7 +47,6 @@ export const useConsentStore = create((set) => ({ localStorage.setItem(CONSENT_KEY, stored); localStorage.removeItem(OLD_CONSENT_KEY); } catch { - // Ignore if parse fails } } } @@ -64,11 +63,9 @@ export const useConsentStore = create((set) => ({ advertising: !!parsed.advertising, }); } catch { - // If parsing fails, show banner set({ isInitialized: true, isOpen: true }); } } else { - // No consent found, show banner set({ isInitialized: true, isOpen: true }); } } diff --git a/lib/security.ts b/lib/security.ts index b67b813..c9f00b4 100644 --- a/lib/security.ts +++ b/lib/security.ts @@ -12,10 +12,10 @@ export function escapeHtml(unsafe: string): string { const rateLimitMap = new Map(); const MAX_REQUESTS = 5; -const WINDOW_MS = 10 * 60 * 1000; // 10 minutes +const WINDOW_MS = 10 * 60 * 1000; export function rateLimit(ip: string | undefined | null): boolean { - if (!ip) return true; // fallback if IP can't be resolved + if (!ip) return true; const now = Date.now(); const entry = rateLimitMap.get(ip);