import React, { useState } from 'react'; type Props = { message: string; className?: string; }; export default function ExceptionMessage({ message, className = '' }: Props) { const [fullException, setFullException] = useState(false); function handleClick() { // Ignore click even when selecting expanded text. if ((fullException && window.getSelection()?.toString().length) || 0 > 0) { return; } setFullException(!fullException); } return (
{message}
); }