import React, { useContext } from 'react'; import FormattedExceptionMessage from '../ui/FormattedExceptionMessage'; import ErrorOccurrenceContext from '../../contexts/ErrorOccurrenceContext'; import Solutions from './Solutions'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faLaravel } from '@fortawesome/free-brands-svg-icons'; import { faCodeBranch } from '@fortawesome/free-solid-svg-icons'; import ExceptionSelector from './ExceptionSelector'; import ErrorBoundary from '../ui/ErrorBoundary'; export default function ErrorCard() { const errorOccurrence = useContext(ErrorOccurrenceContext); const hasSolutions = errorOccurrence.solutions.length > 0; const isLaravelError = !!errorOccurrence.context_items.env?.laravel_version; return (
PHP   {errorOccurrence.language_version} {errorOccurrence.framework_version && ( {errorOccurrence.framework_version} )}
{hasSolutions && }
); }