Skip to content

Commit acbde69

Browse files
committed
update some issues caused by merge with main branch
1 parent ed4c6d3 commit acbde69

File tree

4 files changed

+9
-14
lines changed

4 files changed

+9
-14
lines changed

redisinsight/ui/src/components/base/icons/RiIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const RiIcon = ({ type, size, ...props }: IconComponentProps) => {
4141
return (
4242
<img
4343
{...(props as ImgHTMLAttributes<HTMLImageElement>)}
44-
alt={props.title ? props.title : ''}
44+
alt={props.title ?? ''}
4545
src={type}
4646
className={cx(type, props.className)}
4747
style={props.style}

redisinsight/ui/src/pages/browser/components/bulk-actions/BulkActionsTabs/BulkActionsTabs.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import React, { useMemo } from 'react'
2-
import { EuiIcon } from '@elastic/eui'
32
import { useSelector } from 'react-redux'
43

54
import { BulkActionsType } from 'uiSrc/constants'
65
import { selectedBulkActionsSelector } from 'uiSrc/slices/browser/bulkActions'
7-
import BulkUpload from 'uiSrc/assets/img/icons/bulk-upload.svg?react'
86

97
import {
108
getMatchType,
@@ -17,6 +15,7 @@ import { keysSelector } from 'uiSrc/slices/browser/keys'
1715
import Tabs, { TabInfo } from 'uiSrc/components/base/layout/tabs'
1816

1917
import { Text } from 'uiSrc/components/base/text'
18+
import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
2019
import styles from './styles.module.scss'
2120

2221
export interface Props {
@@ -58,7 +57,7 @@ const BulkActionsTabs = (props: Props) => {
5857
value: BulkActionsType.Delete,
5958
label: (
6059
<>
61-
<EuiIcon type="trash" />
60+
<RiIcon type="DeleteIcon" />
6261
<Text>Delete Keys</Text>
6362
</>
6463
),
@@ -68,7 +67,7 @@ const BulkActionsTabs = (props: Props) => {
6867
value: BulkActionsType.Upload,
6968
label: (
7069
<>
71-
<EuiIcon type={BulkUpload} />
70+
<RiIcon type="BulkUploadIcon" />
7271
<Text>Upload Data</Text>
7372
</>
7473
),

redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-formatter/KeyDetailsHeaderFormatter.styles.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import { EuiIcon } from '@elastic/eui'
2-
31
import styled from 'styled-components'
42
import { ComponentProps } from 'react'
53
import { ColorText } from 'uiSrc/components/base/text'
64
import { RiSelect } from 'uiSrc/components/base/forms/select/RiSelect'
5+
import { IconComponentProps, RiIcon } from 'uiSrc/components/base/icons/RiIcon'
76

87
type KeyDetailsSelectProps = ComponentProps<typeof RiSelect> & {
98
$fullWidth?: boolean
@@ -38,12 +37,12 @@ const OptionText = styled(ColorText)`
3837
text-overflow: ellipsis;
3938
`
4039

41-
const ControlsIcon = styled(EuiIcon)`
40+
const ControlsIcon = styled(RiIcon)<IconComponentProps>`
4241
position: relative;
43-
margin-left: 3px;
4442
margin-top: 2px;
4543
width: 20px !important;
4644
height: 20px !important;
45+
rotate: 90deg;
4746
4847
:global(.insightsOpen) {
4948
@media only screen and (max-width: 1440px) {

redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-formatter/KeyDetailsHeaderFormatter.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useContext, useEffect, useState } from 'react'
1+
import React, { useEffect, useState } from 'react'
22
import { EuiToolTip } from '@elastic/eui'
33
import { useDispatch, useSelector } from 'react-redux'
44
import { useParams } from 'react-router-dom'
@@ -7,9 +7,7 @@ import {
77
KeyValueFormat,
88
MIDDLE_SCREEN_RESOLUTION,
99
TEXT_DISABLED_STRING_FORMATTING,
10-
Theme,
1110
} from 'uiSrc/constants'
12-
import { ThemeContext } from 'uiSrc/contexts/themeContext'
1311
import {
1412
keysSelector,
1513
selectedKeyDataSelector,
@@ -39,7 +37,6 @@ const KeyDetailsHeaderFormatter = (props: Props) => {
3937
const { width } = props
4038

4139
const { instanceId = '' } = useParams<{ instanceId: string }>()
42-
const { theme } = useContext(ThemeContext)
4340
const { viewType } = useSelector(keysSelector)
4441
const { viewFormat } = useSelector(selectedKeySelector)
4542
const { type: keyType, length } = useSelector(selectedKeyDataSelector) ?? {}
@@ -78,7 +75,7 @@ const KeyDetailsHeaderFormatter = (props: Props) => {
7875
<OptionText color="subdued">{text}</OptionText>
7976
) : (
8077
<ControlsIcon
81-
type={theme === Theme.Dark ? FormattersDark : FormattersLight}
78+
type="SwitchIcon"
8279
data-testid={`key-value-formatter-option-selected-${value}`}
8380
/>
8481
)}

0 commit comments

Comments
 (0)