Replace tabs selector with better solution, also fix some bugs with the modal state
This commit is contained in:
parent
2a7c53f307
commit
530243859c
6 changed files with 347 additions and 182 deletions
|
@ -1,6 +1,14 @@
|
|||
import {makeAutoObservable} from 'mobx'
|
||||
import {makeAutoObservable, runInAction} from 'mobx'
|
||||
import {ProfileViewModel} from './profile-view'
|
||||
|
||||
export class TabsSelectorModel {
|
||||
name = 'tabs-selector'
|
||||
|
||||
constructor() {
|
||||
makeAutoObservable(this)
|
||||
}
|
||||
}
|
||||
|
||||
export class LinkActionsModel {
|
||||
name = 'link-actions'
|
||||
|
||||
|
@ -36,6 +44,7 @@ export class EditProfileModel {
|
|||
export class ShellModel {
|
||||
isModalActive = false
|
||||
activeModal:
|
||||
| TabsSelectorModel
|
||||
| LinkActionsModel
|
||||
| SharePostModel
|
||||
| ComposePostModel
|
||||
|
@ -48,6 +57,7 @@ export class ShellModel {
|
|||
|
||||
openModal(
|
||||
modal:
|
||||
| TabsSelectorModel
|
||||
| LinkActionsModel
|
||||
| SharePostModel
|
||||
| ComposePostModel
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue