From 6db276d237b4773766b2149d8cecdfa934b568eb Mon Sep 17 00:00:00 2001 From: Kunthawat Greethong Date: Mon, 2 Mar 2026 13:17:05 +0700 Subject: [PATCH] fix: Add type definitions inline, remove circular import - Add SiteConfig, NavItem, ProductCategory, WorkHours interfaces - Remove: import { ... } from './site-config' (circular import) - Types now defined at top of file Fixes TypeScript build error on Easypanel. --- dealplustech-astro/src/data/site-config.ts | 50 +++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/dealplustech-astro/src/data/site-config.ts b/dealplustech-astro/src/data/site-config.ts index cba1cc732..fb941e7f7 100644 --- a/dealplustech-astro/src/data/site-config.ts +++ b/dealplustech-astro/src/data/site-config.ts @@ -1,4 +1,52 @@ -import { SiteConfig, NavItem, ProductCategory, WorkHours } from './site-config'; +// Deal Plus Tech - Site Configuration +// Types defined inline to avoid circular imports + +export interface SiteConfig { + name: string; + nameTh: string; + url: string; + description: string; + phone: string; + email: string; + lineId: string; + facebookUrl: string; + address: string; +} + +export interface NavItem { + label: string; + labelEn: string; + href: string; + children?: Array<{ label: string; labelEn: string; href: string; children?: Array<{ label: string; labelEn: string; href: string }> }>; +} + +export interface ProductCategory { + id: string; + name: string; + nameEn: string; + slug: string; + href: string; + image: string; + description: string; + shortDescription?: string; + keywords?: string[]; + seoContent?: string; + specifications?: Array<{ label: string; value: string; unit?: string }>; + features?: string[]; + applications?: string[]; + certifications?: string[]; + faq?: Array<{ question: string; answer: string }>; + schemaData?: any; + relatedProductIds?: string[]; + productTables?: Array<{ tableName: string; headers: string[]; rows: string[][] }>; +} + +export interface WorkHours { + day: string; + hours: string; + isClosed?: boolean; +} + export const siteConfig: SiteConfig = { name: 'Deal Plus Tech',