// ───────────────────────────────────────────────────────────────────────────── // features/home/data/mock.ts // // All mock data for the Home feature lives here. // To connect to a real API, replace the fetch functions below with actual // HTTP calls — the hooks and components stay unchanged. // ───────────────────────────────────────────────────────────────────────────── import i18n from '../../../i18n'; import type { LucideIcon } from 'lucide-react'; import { FileText } from 'lucide-react'; // ── Types ───────────────────────────────────────────────────────────────────── export interface FeatureCard { id: string; title: string; description: string; badge?: string; href: string; Icon: LucideIcon; chartColor: string; // CSS variable: '--chart-1' | '--chart-2' | '--chart-3' | '--chart-4' | '--chart-5' } // ── Mock API function ───────────────────────────────────────────────────────── export async function fetchFeatureCards(): Promise { // Replace with: return fetch('/api/home/features').then(r => r.json()); await new Promise(resolve => setTimeout(resolve, 100)); return [ { id: 'template-cli', title: i18n.t('home.templateCliTitle'), description: i18n.t('home.templateCliDescription'), badge: i18n.t('home.templateClibadge'), href: '/template', Icon: FileText, chartColor: '--chart-1', }, ]; }