import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { observer } from 'mobx-react'; import { RouteTransition } from 'react-router-transition'; import { intlShape } from 'react-intl'; import Link from '../ui/Link'; import InfoBar from '../ui/InfoBar'; import { oneOrManyChildElements, globalError as globalErrorPropType } from '../../prop-types'; import globalMessages from '../../i18n/globalMessages'; export default @observer class AuthLayout extends Component { static propTypes = { children: oneOrManyChildElements.isRequired, pathname: PropTypes.string.isRequired, error: globalErrorPropType.isRequired, isOnline: PropTypes.bool.isRequired, isAPIHealthy: PropTypes.bool.isRequired, retryHealthCheck: PropTypes.func.isRequired, isHealthCheckLoading: PropTypes.bool.isRequired, }; static contextTypes = { intl: intlShape, }; render() { const { children, pathname, error, isOnline, isAPIHealthy, retryHealthCheck, isHealthCheckLoading, } = this.props; const { intl } = this.context; return (