refactor: Remove old react lifecycle methods (#1480)
* refactor: Remove deprecated APIs * bump mobx-react for hooks support * inject -> useStores https://mobx-react.js.org/recipes-migration\#hooks-to-the-rescue * chore: React rules of hooks lint
This commit is contained in:
@ -109,34 +109,34 @@ class UiStore {
|
||||
};
|
||||
|
||||
@action
|
||||
enableEditMode() {
|
||||
enableEditMode = () => {
|
||||
this.editMode = true;
|
||||
}
|
||||
};
|
||||
|
||||
@action
|
||||
disableEditMode() {
|
||||
disableEditMode = () => {
|
||||
this.editMode = false;
|
||||
}
|
||||
};
|
||||
|
||||
@action
|
||||
enableProgressBar() {
|
||||
enableProgressBar = () => {
|
||||
this.progressBarVisible = true;
|
||||
}
|
||||
};
|
||||
|
||||
@action
|
||||
disableProgressBar() {
|
||||
disableProgressBar = () => {
|
||||
this.progressBarVisible = false;
|
||||
}
|
||||
};
|
||||
|
||||
@action
|
||||
toggleMobileSidebar() {
|
||||
toggleMobileSidebar = () => {
|
||||
this.mobileSidebarVisible = !this.mobileSidebarVisible;
|
||||
}
|
||||
};
|
||||
|
||||
@action
|
||||
hideMobileSidebar() {
|
||||
hideMobileSidebar = () => {
|
||||
this.mobileSidebarVisible = false;
|
||||
}
|
||||
};
|
||||
|
||||
@action
|
||||
showToast = (
|
||||
|
Reference in New Issue
Block a user