import React from 'react'; import { cn } from '~/utils'; interface ConvoLinkProps { isActiveConvo: boolean; title: string | null; onRename: () => void; isSmallScreen: boolean; localize: (key: any, options?: any) => string; children: React.ReactNode; } const ConvoLink: React.FC = ({ isActiveConvo, title, onRename, isSmallScreen, localize, children, }) => { return (
{children}
{ if (isSmallScreen) { return; } e.preventDefault(); e.stopPropagation(); onRename(); }} role="button" aria-label={isSmallScreen ? undefined : localize('com_ui_double_click_to_rename')} > {title || localize('com_ui_untitled')}
); }; export default ConvoLink;