/** * ANNOTATED COPY — every line explained * Source: src/components/home/AboutPreview.tsx * NOT used by the app — read this to learn how the real file works */ // Next.js: this file runs in the BROWSER (needs useState, onClick, localStorage, etc.) 'use client'; // (blank line — separates logical blocks for readability) // Import project module (@/ alias = src/ folder in tsconfig) import AppImage from '@/components/ui/AppImage'; // Next.js Link — fast client-side navigation without full page reload import Link from 'next/link'; // Lucide icons — lightweight SVG icon components import { ArrowRight } from 'lucide-react'; // Import project module (@/ alias = src/ folder in tsconfig) import Button from '@/components/ui/Button'; // Import project module (@/ alias = src/ folder in tsconfig) import { useTranslation } from '@/hooks/useTranslation'; // Import project module (@/ alias = src/ folder in tsconfig) import { IMAGES } from '@/lib/images'; // (blank line — separates logical blocks for readability) // Default export — main component/page Next.js or other files import export default function AboutPreview() { // Custom hook — returns t() translator and current locale const { t } = useTranslation(); // (blank line — separates logical blocks for readability) // Line 13: const stats = [ const stats = [ // Property or array item — trailing comma allowed in TypeScript { value: t('aboutPreview.statHalal'), label: t('aboutPreview.statHalalLabel') }, // Property or array item — trailing comma allowed in TypeScript { value: t('aboutPreview.statDays'), label: t('aboutPreview.statDaysLabel') }, // Property or array item — trailing comma allowed in TypeScript { value: t('aboutPreview.statDelivery'), label: t('aboutPreview.statDeliveryLabel') }, // Property or array item — trailing comma allowed in TypeScript { value: t('aboutPreview.statFresh'), label: t('aboutPreview.statFreshLabel') }, // End of array literal ]; // (blank line — separates logical blocks for readability) // Return JSX — describes UI tree React renders to the DOM return ( // JSX element — HTML-like tag becomes React component in browser
// JSX element — HTML-like tag becomes React component in browser
// JSX element — HTML-like tag becomes React component in browser
// JSX element — HTML-like tag becomes React component in browser
// JSX element — HTML-like tag becomes React component in browser // Line 26: {t('aboutPreview.label')} {t('aboutPreview.label')} // JSX element — HTML-like tag becomes React component in browser // JSX element — HTML-like tag becomes React component in browser

{t('aboutPreview.title')}

// JSX element — HTML-like tag becomes React component in browser

{t('aboutPreview.p1')}

// JSX element — HTML-like tag becomes React component in browser

{t('aboutPreview.p2')}

// JSX element — HTML-like tag becomes React component in browser

{t('aboutPreview.p3')}

// (blank line — separates logical blocks for readability) // JSX element — HTML-like tag becomes React component in browser
// Array.map — transform each item (often render a list of components) {stats.map((stat) => ( // JSX element — HTML-like tag becomes React component in browser
> // JSX element — HTML-like tag becomes React component in browser

{stat.value}

// JSX element — HTML-like tag becomes React component in browser

{stat.label}

// JSX element — HTML-like tag becomes React component in browser
// Line 42: ))} ))} // JSX element — HTML-like tag becomes React component in browser
// (blank line — separates logical blocks for readability) // JSX element — HTML-like tag becomes React component in browser // JSX element — HTML-like tag becomes React component in browser // JSX element — HTML-like tag becomes React component in browser // JSX element — HTML-like tag becomes React component in browser
// (blank line — separates logical blocks for readability) // JSX element — HTML-like tag becomes React component in browser
// JSX element — HTML-like tag becomes React component in browser /> // JSX element — HTML-like tag becomes React component in browser
// JSX element — HTML-like tag becomes React component in browser
// JSX element — HTML-like tag becomes React component in browser
// JSX element — HTML-like tag becomes React component in browser
// JSX element — HTML-like tag becomes React component in browser
// Line 66: ); ); // Closing brace — end of block (function, if, object, JSX) }