u
This commit is contained in:
@@ -12,16 +12,13 @@ import SettingsIcon from '@mui/icons-material/Settings';
|
||||
import HelpOutlineRoundedIcon from '@mui/icons-material/HelpOutlineRounded';
|
||||
import Switch from '@mui/material/Switch';
|
||||
import Divider from '@mui/material/Divider';
|
||||
import { StorageManagerContext } from '../api/storageManagerContext';
|
||||
import authAutomat from '../automats/authAutomat';
|
||||
import authAutomat, { bootstrapAuthMe } from '../automats/authAutomat';
|
||||
import { helpAutomat, toggleHelp } from '../automats';
|
||||
import CompanySettingsDialog from './CompanySettingsDialog';
|
||||
import SettingsDialog from './settings/SettingsDialog';
|
||||
import { notifyError } from '../utils/notify';
|
||||
|
||||
class UserMenu extends PureComponent {
|
||||
static contextType = StorageManagerContext;
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
@@ -87,7 +84,7 @@ class UserMenu extends PureComponent {
|
||||
this.setState({ anchorEl: null });
|
||||
try {
|
||||
await authAutomat.actions.logout();
|
||||
await this.context.updateAuthMe();
|
||||
await bootstrapAuthMe();
|
||||
} catch (err) {
|
||||
notifyError(err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user