mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-28 16:00:24 +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';
|
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<{
|
class AuthPage extends Component<{
|
||||||
client: {
|
client: {
|
||||||
id: string,
|
id: string,
|
||||||
@ -31,7 +37,7 @@ class AuthPage extends Component<{
|
|||||||
isSidebarHidden: bool
|
isSidebarHidden: bool
|
||||||
}> {
|
}> {
|
||||||
state = {
|
state = {
|
||||||
isSidebarHidden: false
|
isSidebarHidden: isSidebarHiddenCache
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
@ -66,6 +72,8 @@ class AuthPage extends Component<{
|
|||||||
}
|
}
|
||||||
|
|
||||||
onGoToAuth = () => {
|
onGoToAuth = () => {
|
||||||
|
isSidebarHiddenCache = true;
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
isSidebarHidden: true
|
isSidebarHidden: true
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user