Skip to content

Commit 987cdde

Browse files
committed
#RI-5033 - fix pr comment
1 parent 3b4f12c commit 987cdde

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

redisinsight/ui/src/pages/browser/modules/key-details-header/KeyDetailsHeader.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
EuiToolTip,
77
} from '@elastic/eui'
88
import React, { ReactElement } from 'react'
9+
import { isUndefined } from 'lodash'
910
import { useDispatch, useSelector } from 'react-redux'
1011
import AutoSizer from 'react-virtualized-auto-sizer'
1112

@@ -47,7 +48,7 @@ export interface KeyDetailsHeaderProps {
4748
isFullScreen: boolean
4849
arePanelsCollapsed: boolean
4950
onToggleFullScreen: () => void
50-
Actions: (props: { width: number }) => Nullable<ReactElement>
51+
Actions?: (props: { width: number }) => ReactElement
5152
}
5253

5354
const KeyDetailsHeader = ({
@@ -58,7 +59,7 @@ const KeyDetailsHeader = ({
5859
onRemoveKey,
5960
onEditKey,
6061
keyType,
61-
Actions = () => null,
62+
Actions,
6263
}: KeyDetailsHeaderProps) => {
6364
const { loading, lastRefreshTime } = useSelector(selectedKeySelector)
6465
const {
@@ -186,7 +187,7 @@ const KeyDetailsHeader = ({
186187
{Object.values(KeyTypes).includes(keyType as KeyTypes) && (
187188
<KeyDetailsHeaderFormatter width={width} />
188189
)}
189-
{keyType && <Actions width={width} /> }
190+
{!isUndefined(Actions) && <Actions width={width} />}
190191
<KeyDetailsHeaderDelete onDelete={handleDeleteKey} />
191192
</div>
192193
</EuiFlexItem>

0 commit comments

Comments
 (0)