import React from "react"; export const CodeBlockSkeleton = ({ hasTabs = false }) => { // Use deterministic values to prevent hydration issues const skeletonLines = React.useMemo(() => { const lines: Array<{ width: string; delay: string }> = []; const widths = ["35%", "45%", "50%", "60%", "65%", "75%", "80%"]; const numberOfLines = 6; // Fixed number to prevent hydration issues for (let i = 0; i < numberOfLines; i++) { const widthIndex = i % widths.length; lines.push({ width: widths[widthIndex], delay: `${i * 0.1}s`, }); } return lines; }, []); const secondaryLines = [ { width: "30%", delay: "0.05s" }, { width: "25%", delay: "0.15s" }, { width: "35%", delay: "0.25s" }, { width: "20%", delay: "0.35s" }, ]; return (
{!hasTabs && }
{skeletonLines.map((line, index) => (
{index % 3 === 0 && (
)}
))}
); }; const InlineCopyButton = () => { return (
); };