feat: dynamic UI texts system + admin panel editor + Vazirmatn local font + bug fixes

- Add getText() system for all homepage sections (Header, Hero, FeaturedProducts, SmartAdvisor, VetGallery, Footer)
- Add UITexts admin page in frontend/admin-panel with search, group collapse, per-key save
- Add seed-ui-texts.ts with 102 texts in 9 groups
- Add local VazirmatnVariable.woff2 font, remove CDN + Inter references
- Fix hero image path, productService return type { data, meta }
- Fix ArchivePage pagination + CATEGORIES list + breadcrumbs
- Fix BlogPage/Wiki page links + brightness-0 invert removal
- Fix IngredientWiki search + product links + placeholder
- Fix all getProducts() callers for { data } destructuring
- Fix sitemap.ts, CartDrawer, B2BPortal, CheckoutPage type issues
- Add .gitignore for /fonts/ and /backend/uploads/
This commit is contained in:
parsa aghaei committed 2026-07-11 17:19:55 +03:30
1 parent ab7ed279c8
commit 1a0c98a34e
26 files changed
+653 -132

No files matched your search

@@ -79,8 +79,9 @@ export default function ProductPage({ productSlug }: { productSlug: string }) {
const [allProducts, setAllProducts] = useState<Product[]>([]);
useEffect(() => {
productService.getProducts()
.then((products) => {
productService.getProducts({ limit: 999 })
.then((res) => {
const products = res.data;
setAllProducts(products);
const found = products.find(p => p.slug === productSlug || p.id === productSlug);
setProduct(found || null);
@@ -225,7 +226,7 @@ export default function ProductPage({ productSlug }: { productSlug: string }) {
</div>
{/* Key Benefits Section */}
{fullProduct.keyBenefits?.length > 0 && (
{fullProduct.keyBenefits && fullProduct.keyBenefits.length > 0 && (
<section className="space-y-8">
<div className="flex items-center gap-4">
<div className="w-12 h-12 bg-canina-blue text-white rounded-2xl flex items-center justify-center shadow-lg">
@@ -383,7 +384,7 @@ export default function ProductPage({ productSlug }: { productSlug: string }) {
</section>
{/* FAQ Section */}
{product.faqs?.length > 0 && (
{product.faqs && product.faqs.length > 0 && (
<section className="pt-10">
<div className="flex items-center gap-4 mb-10">
<div className="w-12 h-12 bg-blue-100 text-canina-blue rounded-2xl flex items-center justify-center">
@@ -500,7 +501,7 @@ export default function ProductPage({ productSlug }: { productSlug: string }) {
</div>
{/* expected results box */}
{product.expectedResults?.length > 0 && (
{product.expectedResults && product.expectedResults.length > 0 && (
<div className="bg-white rounded-[2.5rem] border border-medical-gray-200 p-8">
<h4 className="text-[10px] font-black text-medical-gray-400 uppercase tracking-widest mb-6 font-vazir">تغییرات قابل انتظار</h4>
<div className="space-y-4">