diff --git a/platform/ui/src/components/SidePanel/SidePanel.jsx b/platform/ui/src/components/SidePanel/SidePanel.jsx
index a4faf4bd5..6e2e4c092 100644
--- a/platform/ui/src/components/SidePanel/SidePanel.jsx
+++ b/platform/ui/src/components/SidePanel/SidePanel.jsx
@@ -1,4 +1,4 @@
-import React, { useState } from 'react';
+import React, { useState, useCallback } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
@@ -38,6 +38,11 @@ const classesMap = {
},
};
+const openIconName = {
+ left: 'panel-left',
+ right: 'panel-right',
+};
+
const SidePanel = ({
side,
className,
@@ -50,12 +55,8 @@ const SidePanel = ({
const [isOpen, setIsOpen] = useState(defaultIsOpen);
const openStatus = isOpen ? 'open' : 'closed';
const style = Object.assign({}, styleMap[openStatus][side], baseStyle);
- const openIconName = {
- left: 'chevron-right',
- right: 'chevron-right',
- };
- const sidePanelHeader = () => {
+ const getSidePanelHeader = useCallback(() => {
return (