refactor: move all applicable parts to mobx instead of passing from parent to children components

This commit is contained in:
VardanHakobyan
2021-06-16 15:16:45 +04:00
parent cd5388d89f
commit 96aaff5ff8
9 changed files with 186 additions and 160 deletions

View File

@@ -5,7 +5,6 @@ import { WebApplication } from '@/ui_models/application';
type Props = {
email: string;
server: string | undefined;
appState: AppState;
application: WebApplication;
closeAccountMenu: () => void;
@@ -13,11 +12,12 @@ type Props = {
const User = observer(({
email,
server,
appState,
application,
closeAccountMenu
}: Props) => {
const { server } = appState.accountMenu;
const openPasswordWizard = () => {
closeAccountMenu();
application.presentPasswordWizard(PasswordWizardType.ChangePassword);