fleet/frontend/interfaces/errors500.js
noahtalerman d604c6a106
Updated 500 page copy and added button to reveal error message. (#1)
Updated the 500 page component to render a "SHOW ERROR" button.

This button is only rendered if the errors slice of the state contains an error and the base property exists. Otherwise, the 500 page will not render this button because there is no error message to show the user.

Created a errors500 reducer and actions to update the state tree when a 500 error occurs. When 500 error occurs, the errors slice of state is updated with the error object. When the 500 page component unmounts the error object is removed from state.

Demo: https://www.loom.com/share/b87c4aee42274e7bb553e703d3f950c6
2020-11-04 12:07:53 -08:00

7 lines
133 B
JavaScript

import PropTypes from 'prop-types';
export default PropTypes.shape({
http_status: PropTypes.number,
base: PropTypes.string,
});