text: import React from 'react';
  
  import AuthUserContext from './AuthUserContext';
  import { PasswordForgetForm } from './PasswordForget';
  import PasswordChangeForm from './PasswordChange';
  import withAuthorization from './withAuthorization';
  
  const AdminPage = () =>
    <AuthUserContext.Consumer>
      {authUser =>
        <div>
          <h1>Admin</h1>
          <p>Restricted area! Only users with the admin rule are authorized.</p>
          <h1>Account: {authUser.email}</h1>
          <PasswordForgetForm />
          <PasswordChangeForm />
        </div>
      }
    </AuthUserContext.Consumer>
  
  const authCondition = (authUser) => !!authUser && authUser.role === 'ADMIN';
  
  export default withAuthorization(authCondition)(AdminPage);
  