forked from Graylog2/graylog2-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not show global notifications in 404 page (Graylog2#4389)
* Do not show global notifications in error pages Avoid displaying global notifications in not found page. So far other error pages will not be affected, as they are rendered before react-router is used. * Fix linter errors
- Loading branch information
Showing
5 changed files
with
98 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
graylog2-web-interface/src/routing/AppWithGlobalNotifications.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
import AppGlobalNotifications from './AppGlobalNotifications'; | ||
|
||
const AppWithGlobalNotifications = React.createClass({ | ||
propTypes: { | ||
children: PropTypes.oneOfType([ | ||
PropTypes.arrayOf(PropTypes.element), | ||
PropTypes.element, | ||
]).isRequired, | ||
}, | ||
render() { | ||
return ( | ||
<div> | ||
<AppGlobalNotifications /> | ||
{this.props.children} | ||
</div> | ||
); | ||
}, | ||
}); | ||
|
||
export default AppWithGlobalNotifications; |