refactor: rename states to view controllers (#1060)

This commit is contained in:
Mo
2022-06-01 10:15:45 -05:00
committed by GitHub
parent 78f39ec85d
commit 54125cec21
177 changed files with 1518 additions and 1365 deletions

View File

@@ -1,7 +1,7 @@
import Button from '@/Components/Button/Button'
import { WebApplication } from '@/UIModels/Application'
import { AppState } from '@/UIModels/AppState'
import { PurchaseFlowPane } from '@/UIModels/AppState/PurchaseFlowPane'
import { WebApplication } from '@/Application/Application'
import { ViewControllerManager } from '@/Services/ViewControllerManager'
import { PurchaseFlowPane } from '@/Controllers/PurchaseFlow/PurchaseFlowPane'
import { observer } from 'mobx-react-lite'
import { ChangeEventHandler, FunctionComponent, useEffect, useRef, useState } from 'react'
import FloatingLabelInput from '@/Components/Input/FloatingLabelInput'
@@ -10,12 +10,12 @@ import { BlueDotIcon, CircleIcon, DiamondIcon, CreateAccountIllustration } from
import { loadPurchaseFlowUrl } from '../PurchaseFlowFunctions'
type Props = {
appState: AppState
viewControllerManager: ViewControllerManager
application: WebApplication
}
const CreateAccount: FunctionComponent<Props> = ({ appState, application }) => {
const { setCurrentPane } = appState.purchaseFlow
const CreateAccount: FunctionComponent<Props> = ({ viewControllerManager, application }) => {
const { setCurrentPane } = viewControllerManager.purchaseFlowController
const [email, setEmail] = useState('')
const [password, setPassword] = useState('')
const [confirmPassword, setConfirmPassword] = useState('')

View File

@@ -1,7 +1,7 @@
import Button from '@/Components/Button/Button'
import { WebApplication } from '@/UIModels/Application'
import { AppState } from '@/UIModels/AppState'
import { PurchaseFlowPane } from '@/UIModels/AppState/PurchaseFlowPane'
import { WebApplication } from '@/Application/Application'
import { ViewControllerManager } from '@/Services/ViewControllerManager'
import { PurchaseFlowPane } from '@/Controllers/PurchaseFlow/PurchaseFlowPane'
import { observer } from 'mobx-react-lite'
import { ChangeEventHandler, FunctionComponent, useEffect, useRef, useState } from 'react'
import FloatingLabelInput from '@/Components/Input/FloatingLabelInput'
@@ -10,12 +10,12 @@ import { BlueDotIcon, CircleIcon, DiamondIcon } from '@standardnotes/icons'
import { loadPurchaseFlowUrl } from '../PurchaseFlowFunctions'
type Props = {
appState: AppState
viewControllerManager: ViewControllerManager
application: WebApplication
}
const SignIn: FunctionComponent<Props> = ({ appState, application }) => {
const { setCurrentPane } = appState.purchaseFlow
const SignIn: FunctionComponent<Props> = ({ viewControllerManager, application }) => {
const { setCurrentPane } = viewControllerManager.purchaseFlowController
const [email, setEmail] = useState('')
const [password, setPassword] = useState('')
const [isSigningIn, setIsSigningIn] = useState(false)