We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8dc5020 commit f95786fCopy full SHA for f95786f
src/components/Menus/Sidebar/SidebarPanel.jsx
@@ -16,14 +16,12 @@ const SidebarPanel = (props) => {
16
} = props;
17
const isMobile = useMediaQuery({ query: MOBILE_MEDIA_QUERY });
18
19
- const buttonNodes = React.Children.toArray(buttons);
20
-
21
const panelContent = (
22
<>
23
<div className="sidebar__panel-header">
24
<h2 className="sidebar__panel-heading">{heading}</h2>
25
- {buttonNodes.length > 0 && (
26
- <div className="sidebar__panel-buttons">{buttonNodes}</div>
+ {buttons?.length > 0 && (
+ <div className="sidebar__panel-buttons">{buttons}</div>
27
)}
28
</div>
29
<div className="sidebar__panel-content">{children}</div>
0 commit comments