fix(contact): use database settings everywhere
Deploy Canina / deploy (push) Successful in 3m36s

This commit is contained in:
devops committed 2026-10-15 20:13:57 +00:00
1 parent 66cbf4c68d
commit d9ff4aef58
15 files changed
+64 -138

No files matched your search

+5 -5
View File
@@ -43,13 +43,13 @@ export function generateOrganizationSchema(options: OrganizationSchemaOptions =
options.description ||
'نماینده رسمی و انحصاری مکمل‌های دارویی و درمانی Canina pharma GmbH آلمان در ایران.',
telephone: options.telephone || '+989211231517',
email: options.email || 'caninairan@gmail.com',
email: options.email || undefined,
address: {
'@type': 'PostalAddress',
streetAddress: options.address?.streetAddress || 'جردن، خیابان سعیدی، ساختمان کنینا، طبقه ۵',
streetAddress: options.address?.streetAddress || undefined,
addressLocality: options.address?.addressLocality || 'تهران',
addressRegion: options.address?.addressRegion || 'تهران',
postalCode: options.address?.postalCode || '1967812345',
postalCode: options.address?.postalCode || undefined,
addressCountry: options.address?.addressCountry || 'IR',
},
sameAs: options.sameAs || [
@@ -85,10 +85,10 @@ export function generateLocalBusinessSchema(options: OrganizationSchemaOptions =
priceRange: '$$',
address: {
'@type': 'PostalAddress',
streetAddress: options.address?.streetAddress || 'تهران، جردن، خیابان سعیدی، ساختمان کنینا، طبقه ۵، واحد ۱۹',
streetAddress: options.address?.streetAddress || undefined,
addressLocality: options.address?.addressLocality || 'تهران',
addressRegion: options.address?.addressRegion || 'تهران',
postalCode: options.address?.postalCode || '1967812345',
postalCode: options.address?.postalCode || undefined,
addressCountry: 'IR',
},
geo: {
@@ -62,8 +62,8 @@ export const useSettingsStore = create<SettingsStore>()((set, get) => ({
texts[key.toUpperCase()];
if (value === undefined || value === null || value === '') {
// Special aliases
if (key === 'contact_phone') return texts['CONTACT_PHONE'] || texts['footer_phone'] || texts['maintenance_contact_phone'] || fallback;
if (key === 'contact_phone_link') return texts['CONTACT_PHONE_LINK'] || texts['maintenance_contact_phone_link'] || (texts['contact_phone'] ? `tel:${texts['contact_phone'].replace(/[^0-9+]/g, '')}` : fallback);
if (key === 'contact_phone') return texts['CONTACT_PHONE'] || fallback;
if (key === 'contact_phone_link') return texts['CONTACT_PHONE_LINK'] || fallback;
if (key === 'site_logo') return texts['BRAND_LOGO_URL'] || texts['brand_logo_url'] || fallback;
if (key === 'site_logo_text_en') return texts['BRAND_LOGO_TEXT_EN'] || fallback;
if (key === 'site_logo_text_fa') return texts['BRAND_LOGO_TEXT_FA'] || texts['brand_name_fa'] || fallback;