// @flow import React, { Component } from 'react'; import { Route, Switch, Redirect } from 'react-router-dom'; import AppInfo from 'components/auth/appInfo/AppInfo'; import PanelTransition from 'components/auth/PanelTransition'; import Register from 'components/auth/register/Register'; import Login from 'components/auth/login/Login'; import Permissions from 'components/auth/permissions/Permissions'; import ChooseAccount from 'components/auth/chooseAccount/ChooseAccount'; import Activation from 'components/auth/activation/Activation'; import ResendActivation from 'components/auth/resendActivation/ResendActivation'; import Password from 'components/auth/password/Password'; import AcceptRules from 'components/auth/acceptRules/AcceptRules'; import ForgotPassword from 'components/auth/forgotPassword/ForgotPassword'; import RecoverPassword from 'components/auth/recoverPassword/RecoverPassword'; import Mfa from 'components/auth/mfa/Mfa'; import Finish from 'components/auth/finish/Finish'; import styles from './auth.scss'; // TODO: after migrating to new react router (posibly) this view started remounting // after route change e.g. /login -> /password which results in state dropping // we should find why this view is remounting or move isSidebarHidden into store // so that it persist disregarding remounts let isSidebarHiddenCache = false; class AuthPage extends Component<{ client: { id: string, name: string, description: string } }, { isSidebarHidden: bool }> { state = { isSidebarHidden: isSidebarHiddenCache }; render() { const {isSidebarHidden} = this.state; const {client} = this.props; return (