2022-06-02 02:26:52 +00:00
|
|
|
import { faCircleExclamation } from "@fortawesome/free-solid-svg-icons";
|
|
|
|
import { FestaIcon } from "./FestaIcon";
|
|
|
|
|
|
|
|
type ErrorBlockProps = {
|
|
|
|
error: JSON,
|
2022-06-02 02:34:40 +00:00
|
|
|
text: string
|
2022-06-02 02:26:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export function ErrorBlock(props: ErrorBlockProps) {
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="error error-block negative">
|
|
|
|
<p>
|
|
|
|
<FestaIcon icon={faCircleExclamation}/>
|
|
|
|
|
|
|
|
<span>
|
2022-06-02 02:34:40 +00:00
|
|
|
{props.text}
|
2022-06-02 02:26:52 +00:00
|
|
|
</span>
|
|
|
|
</p>
|
|
|
|
<pre>
|
|
|
|
<code lang="json">
|
|
|
|
{JSON.stringify(props.error, undefined, 4)}
|
|
|
|
</code>
|
|
|
|
</pre>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|