Skip to content

Commit 6798a2b

Browse files
committed
refactor: replace Tooltip and getAlphabetIcon with UserIdentifier for updatedBy and deployedBy fields
1 parent d3f8634 commit 6798a2b

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

src/Pages/ChartStore/ChartDetails/ChartDetailsTableComponents.tsx

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@ import {
1010
ButtonStyleType,
1111
ButtonVariantType,
1212
ComponentSizeType,
13-
getAlphabetIcon,
1413
handleAnalyticsEvent,
1514
Icon,
1615
ImageWithFallback,
1716
PortalContainer,
1817
SearchBar,
1918
SERVER_MODE,
2019
stringComparatorBySortOrder,
21-
Tooltip,
20+
UserIdentifier,
2221
} from '@devtron-labs/devtron-fe-common-lib'
2322

2423
import { getAppId } from '@Components/v2/appDetails/k8Resource/nodeDetail/nodeDetail.api'
@@ -63,14 +62,7 @@ const PresetValuesTableIconCellComponent = () => (
6362
const PresetValuesTableLastUpdatedByCellComponent = ({ row }: PresetValuesTableCellComponentProps) => {
6463
const { updatedBy } = row.data
6564

66-
return (
67-
<span className="flex left">
68-
{updatedBy && getAlphabetIcon(updatedBy)}
69-
<Tooltip content={updatedBy}>
70-
<span className="fs-13 lh-20 cn-9 dc__truncate">{updatedBy || '-'}</span>
71-
</Tooltip>
72-
</span>
73-
)
65+
return <UserIdentifier identifier={updatedBy} />
7466
}
7567

7668
const PresetValuesTableUpdatedAtCellComponent = ({ row }: PresetValuesTableCellComponentProps) => {
@@ -264,14 +256,7 @@ const DeploymentsTableStatusCellComponent = ({ row }: DeploymentsTableCellCompon
264256
const DeploymentsTableDeployedByCellComponent = ({ row }: DeploymentsTableCellComponentProps) => {
265257
const { deployedBy } = row.data
266258

267-
return (
268-
<span className="flex left">
269-
{deployedBy && getAlphabetIcon(deployedBy)}
270-
<Tooltip content={deployedBy}>
271-
<span className="fs-13 lh-20 cn-9 dc__truncate">{deployedBy || '-'}</span>
272-
</Tooltip>
273-
</span>
274-
)
259+
return <UserIdentifier identifier={deployedBy} />
275260
}
276261

277262
const DeploymentsTableDeployedAtCellComponent = ({ row }: DeploymentsTableCellComponentProps) => {

0 commit comments

Comments
 (0)