mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
#149: create bsod component
This commit is contained in:
@@ -6,6 +6,7 @@ import classNames from 'classnames';
|
||||
|
||||
import Userbar from 'components/userbar/Userbar';
|
||||
import PopupStack from 'components/ui/popup/PopupStack';
|
||||
import BSoD from 'components/ui/bsod/BSoD';
|
||||
|
||||
import styles from './root.scss';
|
||||
|
||||
@@ -22,6 +23,10 @@ if (process.env.NODE_ENV === 'production') {
|
||||
function RootPage(props) {
|
||||
const isRegisterPage = props.location.pathname === '/register';
|
||||
|
||||
if (props.bsod) {
|
||||
return <BSoD />;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.root}>
|
||||
<div id="view-port" className={classNames(styles.viewPort, {
|
||||
@@ -56,14 +61,16 @@ RootPage.propTypes = {
|
||||
pathname: PropTypes.string
|
||||
}).isRequired,
|
||||
children: PropTypes.element,
|
||||
bsod: PropTypes.bool.isRequired,
|
||||
logout: PropTypes.func.isRequired,
|
||||
isPopupActive: PropTypes.bool
|
||||
isPopupActive: PropTypes.bool.isRequired
|
||||
};
|
||||
|
||||
import { connect } from 'react-redux';
|
||||
import { logout } from 'components/user/actions';
|
||||
|
||||
export default connect((state) => ({
|
||||
bsod: state.bsod,
|
||||
user: state.user,
|
||||
isPopupActive: state.popup.popups.length > 0
|
||||
}), {
|
||||
|
||||
Reference in New Issue
Block a user