如何在不使用自定义布局的情况下隐藏应用栏上的配置文件菜单?

How to hide the profile menu on the app bar without using a custom layout?

我需要在应用栏上放置注销按钮而不是配置文件菜单。

我正在考虑这个:

我正在查看 react-admin 文档,但如果不使用带有自定义应用栏的自定义布局,我没有找到明确的内容。

这在 react-admin 文档的 theming section 中有记录:

import { AppBar, UserMenu, MenuItemLink } from 'react-admin';
import SettingsIcon from '@material-ui/icons/Settings';

const MyUserMenu = props => (
    <UserMenu {...props}>
        <MenuItemLink
            to="/configuration"
            primaryText="Configuration"
            leftIcon={<SettingsIcon />}
        />
    </UserMenu>
);

const MyAppBar = props => <AppBar {...props} userMenu={<MyUserMenu />} />;

const MyLayout = props => <Layout {...props} appBar={MyAppBar} />;