/** * ANNOTATED COPY — every line explained * Source: src/app/not-found.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) // Next.js Link — fast client-side navigation without full page reload import Link from 'next/link'; // 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'; // (blank line — separates logical blocks for readability) // Default export — main component/page Next.js or other files import export default function NotFound() { // 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
{t('notFound.message')}
// 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