refactor: rename states to view controllers (#1060)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import Button from '@/Components/Button/Button'
|
||||
import { Text, Title } from '@/Components/Preferences/PreferencesComponents/Content'
|
||||
import { WebApplication } from '@/UIModels/Application'
|
||||
import { AppState } from '@/UIModels/AppState'
|
||||
import { WebApplication } from '@/Application/Application'
|
||||
import { ViewControllerManager } from '@/Services/ViewControllerManager'
|
||||
import { observer } from 'mobx-react-lite'
|
||||
import { FunctionComponent } from 'react'
|
||||
import { AccountIllustration } from '@standardnotes/icons'
|
||||
@@ -11,20 +11,20 @@ import PreferencesSegment from '../../PreferencesComponents/PreferencesSegment'
|
||||
|
||||
type Props = {
|
||||
application: WebApplication
|
||||
appState: AppState
|
||||
viewControllerManager: ViewControllerManager
|
||||
}
|
||||
|
||||
const Authentication: FunctionComponent<Props> = ({ appState }) => {
|
||||
const Authentication: FunctionComponent<Props> = ({ viewControllerManager }) => {
|
||||
const clickSignIn = () => {
|
||||
appState.preferences.closePreferences()
|
||||
appState.accountMenu.setCurrentPane(AccountMenuPane.SignIn)
|
||||
appState.accountMenu.setShow(true)
|
||||
viewControllerManager.preferencesController.closePreferences()
|
||||
viewControllerManager.accountMenuController.setCurrentPane(AccountMenuPane.SignIn)
|
||||
viewControllerManager.accountMenuController.setShow(true)
|
||||
}
|
||||
|
||||
const clickRegister = () => {
|
||||
appState.preferences.closePreferences()
|
||||
appState.accountMenu.setCurrentPane(AccountMenuPane.Register)
|
||||
appState.accountMenu.setShow(true)
|
||||
viewControllerManager.preferencesController.closePreferences()
|
||||
viewControllerManager.accountMenuController.setCurrentPane(AccountMenuPane.Register)
|
||||
viewControllerManager.accountMenuController.setShow(true)
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user