Make homepage carousels fully dynamic, drop brand carousels, dynamic logo/favicon
- Replace the two hardcoded homepage carousels (SpecialSaleCarousel pinned to store-specials group 0 only, TopSellingCarousel reading from an unrelated plain product query) with StoreSpecialCarousels: loops over every group GET /store-specials returns, using each group's own title. A new carousel created in the admin panel (e.g. the "بهترینها از نگاه شما" one just added) shows up automatically, no code change needed. - Remove the brand-groups integration and its "سامسونگ" carousel entirely (getBrandGroups, BrandGroupCarousels) — brand-name carousels aren't wanted on this site per explicit instruction. - SectionTitle's enTitle is now optional, since dynamic store-specials groups only have one title string, not a Persian/English pair. - Move featured categories above the hero-adjacent special carousels per the requested homepage order; drop the "دستهبندیهای پرطرفدار" heading and its "همه دستهها" button, per request. - Wire the header/footer logo and the favicon to the real business data (logoUrl/logoDarkUrl/faviconUrl from GET business-info) instead of static files; removed src/app/favicon.ico, which was silently winning over the new dynamic <link rel="icon">. - CONTEXT.md: document the dynamic-carousel contract and the logo/favicon wiring so neither regresses to hardcoded. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
5152b16d61
commit
bc6cafaffa
@@ -1,6 +1,6 @@
|
||||
type SectionTitleProps = {
|
||||
title: string;
|
||||
enTitle: string;
|
||||
enTitle?: string;
|
||||
subtitle?: string;
|
||||
action?: string;
|
||||
};
|
||||
@@ -11,13 +11,15 @@ export function SectionTitle({ title, enTitle, subtitle, action }: SectionTitleP
|
||||
<div>
|
||||
<div className="flex flex-wrap items-baseline gap-x-3 gap-y-1">
|
||||
<h2 className="text-xl font-bold text-red-dark md:text-2xl">{title}</h2>
|
||||
<span
|
||||
className="font-display text-sm font-semibold tracking-wide text-red-dark/30 uppercase md:text-base"
|
||||
lang="en"
|
||||
dir="ltr"
|
||||
>
|
||||
{enTitle}
|
||||
</span>
|
||||
{enTitle && (
|
||||
<span
|
||||
className="font-display text-sm font-semibold tracking-wide text-red-dark/30 uppercase md:text-base"
|
||||
lang="en"
|
||||
dir="ltr"
|
||||
>
|
||||
{enTitle}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
{subtitle && (
|
||||
<p className="mt-1 text-sm text-muted">{subtitle}</p>
|
||||
|
||||
Reference in New Issue
Block a user