/* eslint-disable */ "use client"; import { HTMLAttributes } from "react"; import { cn } from "@/lib/utils"; import Tooltip from "./Tooltip"; interface EllipsisProps extends HTMLAttributes { children: string; maxCharacters: number; tooltip?: boolean; } const Ellipsis = ({ children: originalContent, className, maxCharacters, tooltip = false, }: EllipsisProps): JSX.Element => { const renderedContent = originalContent.length > maxCharacters ? `${originalContent.slice(0, maxCharacters)}...` : originalContent; console.log(originalContent, maxCharacters, tooltip, renderedContent); if (tooltip && originalContent !== renderedContent) { return ( {renderedContent} ); } return ( {renderedContent} ); }; export default Ellipsis;