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.
This commit is contained in:
@@ -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 = {
|
export const siteConfig: SiteConfig = {
|
||||||
name: 'Deal Plus Tech',
|
name: 'Deal Plus Tech',
|
||||||
|
|||||||
Reference in New Issue
Block a user