Wire analysis/[cad]/page.tsx: replace SidebarPlaceholder with AnalysisSidebar (sticky, IntersectionObserver scrollspy on sections 1/2/3/3.1/3.2/3.3/4/5), header with AnalysisBreadcrumb (SiteFinder → cad → Анализ) and UserAvatar (gd_org_id from localStorage, SSR-safe). Add lucide-react to package.json (was used in A1 but missing from deps).
82 lines
1.7 KiB
TypeScript
82 lines
1.7 KiB
TypeScript
"use client";
|
||
|
||
import Link from "next/link";
|
||
import { ChevronRight } from "lucide-react";
|
||
|
||
interface AnalysisBreadcrumbProps {
|
||
cadNum: string;
|
||
}
|
||
|
||
export function AnalysisBreadcrumb({ cadNum }: AnalysisBreadcrumbProps) {
|
||
return (
|
||
<nav
|
||
aria-label="Breadcrumb"
|
||
style={{
|
||
display: "flex",
|
||
alignItems: "center",
|
||
gap: 4,
|
||
flexWrap: "wrap",
|
||
minWidth: 0,
|
||
flex: 1,
|
||
}}
|
||
>
|
||
{/* SiteFinder root */}
|
||
<Link
|
||
href="/site-finder"
|
||
style={{
|
||
fontSize: 13,
|
||
color: "var(--fg-secondary)",
|
||
textDecoration: "none",
|
||
whiteSpace: "nowrap",
|
||
}}
|
||
>
|
||
SiteFinder
|
||
</Link>
|
||
|
||
<ChevronRight
|
||
size={14}
|
||
strokeWidth={1.5}
|
||
style={{ color: "var(--fg-tertiary)", flexShrink: 0 }}
|
||
aria-hidden
|
||
/>
|
||
|
||
{/* Cad number */}
|
||
<Link
|
||
href={`/site-finder?selected=${encodeURIComponent(cadNum)}`}
|
||
style={{
|
||
fontSize: 13,
|
||
color: "var(--fg-secondary)",
|
||
textDecoration: "none",
|
||
fontVariantNumeric: "tabular-nums",
|
||
whiteSpace: "nowrap",
|
||
overflow: "hidden",
|
||
textOverflow: "ellipsis",
|
||
maxWidth: 260,
|
||
}}
|
||
title={cadNum}
|
||
>
|
||
{cadNum}
|
||
</Link>
|
||
|
||
<ChevronRight
|
||
size={14}
|
||
strokeWidth={1.5}
|
||
style={{ color: "var(--fg-tertiary)", flexShrink: 0 }}
|
||
aria-hidden
|
||
/>
|
||
|
||
{/* Current page */}
|
||
<span
|
||
aria-current="page"
|
||
style={{
|
||
fontSize: 13,
|
||
fontWeight: 600,
|
||
color: "var(--fg-primary)",
|
||
whiteSpace: "nowrap",
|
||
}}
|
||
>
|
||
Анализ
|
||
</span>
|
||
</nav>
|
||
);
|
||
}
|