Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

react-admin

I need to put the logout button instead the profile menu on the app bar.

I'm taking about this:

enter image description here

I was looking in the react-admin documentation but i didn't found something clear without use a custom layout with a custom appbar.

like image 947
Cristian David Ippolito Avatar asked Jan 20 '26 13:01

Cristian David Ippolito


1 Answers

This is documented in the theming section of the react-admin documentation:

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} />;
like image 190
François Zaninotto Avatar answered Jan 23 '26 20:01

François Zaninotto



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!