mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-27 23:40:28 +05:30
Hot fix for the isSidebarHidden state issue
This commit is contained in:
parent
94217ff519
commit
83a8667fb3
@ -21,6 +21,12 @@ 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,
|
||||
@ -31,7 +37,7 @@ class AuthPage extends Component<{
|
||||
isSidebarHidden: bool
|
||||
}> {
|
||||
state = {
|
||||
isSidebarHidden: false
|
||||
isSidebarHidden: isSidebarHiddenCache
|
||||
};
|
||||
|
||||
render() {
|
||||
@ -66,6 +72,8 @@ class AuthPage extends Component<{
|
||||
}
|
||||
|
||||
onGoToAuth = () => {
|
||||
isSidebarHiddenCache = true;
|
||||
|
||||
this.setState({
|
||||
isSidebarHidden: true
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user