+ {pageT("subtitle")} +
++ {concernDescription} +
++ {oilName} +
+ + {pageT("viewSolution")} +{pageT("noResults")}
++ {shortDescription} +
+ ++ {concernCount} {concernCount === 1 ? solutionLabel : solutionsLabel} +
+ ++ {bestFor} +
+ {concerns.slice(0, 3).map((concernName) => ( ++ +{concerns.length - 3} more +
+ )} ++ {pageT("subtitle")} +
++ {pageT("stats.availableOils", { count: oilsWithPages.length })} +
++ {pageT("stats.totalSolutions", { count: allPages.length })} +
+{pageT("noResults")}
++ {description} +
+ + {priority ? "Explore Solutions" : "Learn More"} ++ {hubT("subtitle")} +
++ {hubT("quickAccess.byConcernDesc")} +
++ {hubT("quickAccess.byOilDesc")} +
++ {hubT("cta.description")} +
+ + {hubT("cta.button")} + +- {t("freeShippingOver", { amount: formatPrice(5000) })} + {t("freeShippingOver", { amount: formatPrice(FREE_SHIPPING_THRESHOLD_RSD) })}
)} diff --git a/src/components/home/ExitIntentDetector.tsx b/src/components/home/ExitIntentDetector.tsx index e8b2330..b40ff5a 100644 --- a/src/components/home/ExitIntentDetector.tsx +++ b/src/components/home/ExitIntentDetector.tsx @@ -32,11 +32,17 @@ export default function ExitIntentDetector() { try { const response = await fetch("/api/geoip"); if (response.ok) { - const data = await response.json(); - setCountry(data.country); - setCountryCode(data.countryCode); - setCity(data.city || ""); - setRegion(data.region || ""); + const contentType = response.headers.get("content-type"); + if (contentType && contentType.includes("application/json")) { + const text = await response.text(); + if (text && text.trim()) { + const data = JSON.parse(text); + setCountry(data.country); + setCountryCode(data.countryCode); + setCity(data.city || ""); + setRegion(data.region || ""); + } + } } } catch (error) { console.error("Failed to get country:", error); diff --git a/src/components/home/TickerBar.tsx b/src/components/home/TickerBar.tsx index c86c276..eebe94e 100644 --- a/src/components/home/TickerBar.tsx +++ b/src/components/home/TickerBar.tsx @@ -1,10 +1,11 @@ "use client"; import { motion } from "framer-motion"; +import { FREE_SHIPPING_THRESHOLD_RSD } from "@/lib/config/shipping"; export default function TickerBar() { const items = [ - "Free shipping on orders over 10000 RSD", + `Free shipping on orders over ${FREE_SHIPPING_THRESHOLD_RSD} RSD`, "Natural ingredients", "Cruelty-free", "Handmade with love", diff --git a/src/components/layout/Footer.tsx b/src/components/layout/Footer.tsx index cc20bf5..3103cb4 100644 --- a/src/components/layout/Footer.tsx +++ b/src/components/layout/Footer.tsx @@ -21,6 +21,12 @@ export default function Footer({ locale = "sr" }: FooterProps) { { label: t("skinCare"), href: `${localePath}/products` }, { label: t("giftSets"), href: `${localePath}/products` }, ], + solutions: [ + { label: t("allSolutions"), href: `${localePath}/solutions` }, + { label: t("byConcern"), href: `${localePath}/solutions/by-concern` }, + { label: t("byOil"), href: `${localePath}/solutions/by-oil` }, + { label: t("skincareGuide"), href: `${localePath}/solutions` }, + ], about: [ { label: t("ourStory"), href: `${localePath}/about` }, { label: t("process"), href: `${localePath}/about` }, @@ -74,7 +80,7 @@ export default function Footer({ locale = "sr" }: FooterProps) {