source: frontend/node_modules/@pmmmwh/react-refresh-webpack-plugin/overlay/containers/RuntimeErrorContainer.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 830 bytes
Line 
1const PageHeader = require('../components/PageHeader.js');
2const RuntimeErrorStack = require('../components/RuntimeErrorStack.js');
3const Spacer = require('../components/Spacer.js');
4
5/**
6 * @typedef {Object} RuntimeErrorContainerProps
7 * @property {Error} currentError
8 */
9
10/**
11 * A container to render runtime error messages with stack trace.
12 * @param {Document} document
13 * @param {HTMLElement} root
14 * @param {RuntimeErrorContainerProps} props
15 * @returns {void}
16 */
17function RuntimeErrorContainer(document, root, props) {
18 PageHeader(document, root, {
19 message: props.currentError.message,
20 title: props.currentError.name,
21 topOffset: '2.5rem',
22 });
23 RuntimeErrorStack(document, root, {
24 error: props.currentError,
25 });
26 Spacer(document, root, { space: '1rem' });
27}
28
29module.exports = RuntimeErrorContainer;
Note: See TracBrowser for help on using the repository browser.