Skip to content

Commit f95786f

Browse files
committed
Remove unused
1 parent 8dc5020 commit f95786f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/components/Menus/Sidebar/SidebarPanel.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@ const SidebarPanel = (props) => {
1616
} = props;
1717
const isMobile = useMediaQuery({ query: MOBILE_MEDIA_QUERY });
1818

19-
const buttonNodes = React.Children.toArray(buttons);
20-
2119
const panelContent = (
2220
<>
2321
<div className="sidebar__panel-header">
2422
<h2 className="sidebar__panel-heading">{heading}</h2>
25-
{buttonNodes.length > 0 && (
26-
<div className="sidebar__panel-buttons">{buttonNodes}</div>
23+
{buttons?.length > 0 && (
24+
<div className="sidebar__panel-buttons">{buttons}</div>
2725
)}
2826
</div>
2927
<div className="sidebar__panel-content">{children}</div>

0 commit comments

Comments
 (0)