refactor: read the required data from appState instead of passing by parent component

This commit is contained in:
VardanHakobyan
2021-06-16 16:20:23 +04:00
parent 17515848b4
commit 018251838c
4 changed files with 8 additions and 27 deletions

View File

@@ -7,16 +7,14 @@ type Props = {
email: string;
appState: AppState;
application: WebApplication;
closeAccountMenu: () => void;
}
const User = observer(({
email,
appState,
application,
closeAccountMenu
}: Props) => {
const { server } = appState.accountMenu;
const { server, closeAccountMenu } = appState.accountMenu;
const openPasswordWizard = () => {
closeAccountMenu();