/** * ANNOTATED COPY — every line explained * Source: src/components/home/SocialFollow.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) // Lucide icons — lightweight SVG icon components import { Facebook, Instagram, MessageCircle } from 'lucide-react'; // Import external package or local module import { // Property or array item — trailing comma allowed in TypeScript FACEBOOK_URL, // Property or array item — trailing comma allowed in TypeScript INSTAGRAM_URL, // Property or array item — trailing comma allowed in TypeScript WHATSAPP_URL, // Closing brace — end of block (function, if, object, JSX) } from '@/lib/constants'; // Import project module (@/ alias = src/ folder in tsconfig) import { useTranslation } from '@/hooks/useTranslation'; // (blank line — separates logical blocks for readability) // Line 11: const socialLinks = [ const socialLinks = [ // Line 12: { { // Property or array item — trailing comma allowed in TypeScript key: 'facebook', // Property or array item — trailing comma allowed in TypeScript href: FACEBOOK_URL, // Property or array item — trailing comma allowed in TypeScript icon: Facebook, // Line 16: className: className: // Property or array item — trailing comma allowed in TypeScript 'border-blue-600/20 bg-blue-600/10 text-blue-700 hover:border-blue-600/40 hover:bg-blue-600/15', // Closing brace — end of block (function, if, object, JSX) }, // Line 19: { { // Property or array item — trailing comma allowed in TypeScript key: 'instagram', // Property or array item — trailing comma allowed in TypeScript href: INSTAGRAM_URL, // Property or array item — trailing comma allowed in TypeScript icon: Instagram, // Line 23: className: className: // Property or array item — trailing comma allowed in TypeScript 'border-pink-600/20 bg-pink-600/10 text-pink-700 hover:border-pink-600/40 hover:bg-pink-600/15', // Closing brace — end of block (function, if, object, JSX) }, // Line 26: { { // Property or array item — trailing comma allowed in TypeScript key: 'whatsapp', // Property or array item — trailing comma allowed in TypeScript href: WHATSAPP_URL, // Property or array item — trailing comma allowed in TypeScript icon: MessageCircle, // Line 30: className: className: // Property or array item — trailing comma allowed in TypeScript 'border-green-600/20 bg-green-600/10 text-green-700 hover:border-green-600/40 hover:bg-green-600/15', // Closing brace — end of block (function, if, object, JSX) }, // End of array literal ] as const; // (blank line — separates logical blocks for readability) // Default export — main component/page Next.js or other files import export default function SocialFollow() { // Custom hook — returns t() translator and current locale const { t } = useTranslation(); // (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 // Line 43: {t('social.label')} {t('social.label')} // JSX element — HTML-like tag becomes React component in browser // JSX element — HTML-like tag becomes React component in browser

{t('social.title')}

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

{t('social.subtitle')}

// (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) {socialLinks.map(({ key, href, icon: Icon, className }) => ( // JSX element — HTML-like tag becomes React component in browser > // JSX element — HTML-like tag becomes React component in browser // Line 58: {t(`social.${key}`)} {t(`social.${key}`)} // JSX element — HTML-like tag becomes React component in browser // Line 60: ))} ))} // 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 65: ); ); // Closing brace — end of block (function, if, object, JSX) }