Search code examples
dashboardreact-admin

React-Admin How to change the "Dashboard" name in the menu


How can I change the "dashoboard" menu name in the react-admin?

By default it's name is always "Dashboard" even in the Demo enter image description here

the name is Dashboard. Someone knows a way to change the name or if it is even possible to change?


Solution

  • At the Menu.tsx, don't call it like

    <DashboardMenuItem onClick={onMenuClick} sidebarIsOpen={open} />
    

    Instead call it like a normal menu item but pointing to the dashboard component

    <MenuItemLink
            to={`/`} // by default react-admin renders Dashboard on this route
            primaryText="Your Text"
            leftIcon={<YourIcon />}
            onClick={onMenuClick}
            sidebarIsOpen={open}
            dense={dense}
          />