import type {FetcherWithComponents} from 'react-router'; import {Link} from 'react-router'; import {CartForm, Image} from '@shopify/hydrogen'; import {AbiirEyebrow} from '~/components/AbiirEyebrow'; import {ArrowRight, Check, Sparkles, Star} from 'lucide-react'; import type {SpringGlowBannerCms} from '~/lib/springGlowBanner'; import { ABIIR_WIDE_CONTENT_SHELL_CLASS, hasSpringGlowBannerRating, MOCK_SPRING_GLOW_BANNER_CMS, SPRING_GLOW_BANNER_GROQ, } from '~/lib/springGlowBanner'; /** Local fallback when Sanity has no hero image for this band. */ import bundleFallbackSrc from '~/assets/spring-glow-bundle_new.png'; /** * Sanity GROQ for this module (loader + future `useQuery`): * @see {@link SPRING_GLOW_BANNER_GROQ} */ export {MOCK_SPRING_GLOW_BANNER_CMS, SPRING_GLOW_BANNER_GROQ}; export type {SpringGlowBannerCms} from '~/lib/springGlowBanner'; const IMAGE_OVERLAY = 'linear-gradient(131.54deg, rgba(184, 160, 66, 0.12) 0%, rgba(122, 35, 64, 0.35) 100%)'; function isExternalHref(href: string) { return /^https?:\/\//i.test(href); } function SpringGlowBannerImage({cms}: {cms: SpringGlowBannerCms}) { const alt = cms.image?.alt ?? 'Spring Glow Bundle — Hydra Face Serum, Hydrating Moisturizer & Copper Gua Sha'; if (cms.image?.url) { const w = cms.image.width ?? 1200; const h = cms.image.height ?? 1500; return ( {alt} src ?? ''} sizes="(min-width: 1024px) 50vw, 100vw" /> ); } return ( {alt} ); } export type SpringGlowBannerProps = { cms: SpringGlowBannerCms; bundleVariantId: string | null; }; export function SpringGlowBanner({cms, bundleVariantId}: SpringGlowBannerProps) { const burgundy = cms.sectionBackground; return (
{/* Image column — SpringGlowBanner reference */}

{cms.badgeLabel}

{cms.badgeAmount}

{/* Content column */}
{cms.eyebrow}

{cms.titleLine1Before} {cms.titleLine1Italic} {cms.titleLine2}

{cms.body}

{cms.whatsIncludedLabel}

    {cms.includedItems.map((item) => (
  • {item}
  • ))}
{hasSpringGlowBannerRating(cms) ? (
{Array.from({length: 5}).map((_, i) => ( ))}

{cms.ratingScoreText} {cms.ratingReviewsText ? ` · ${cms.ratingReviewsText}` : null}

) : null}

{cms.priceMain}

{cms.compareAtLine}

{cms.saveLine}

{bundleVariantId ? ( {(fetcher: FetcherWithComponents) => ( )} ) : ( )} {isExternalHref(cms.secondaryCtaHref) ? ( {cms.secondaryCtaLabel} ) : ( {cms.secondaryCtaLabel} )}
); }