Skip to content

Commit 0df64e9

Browse files
committed
chore: code refactoring
1 parent 688c2ce commit 0df64e9

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

src/components/ClusterNodes/ClusterListRow.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ export const ClusterListRow = ({
8484
}
8585
const isIdentifierSelected = !!bulkSelectionState[clusterData.name]
8686

87+
// TODO: @Elessar1802 will be replacing all terminal url with new utils
88+
8789
return (
8890
<div
8991
key={`cluster-${clusterData.id}`}
@@ -105,7 +107,6 @@ export const ClusterListRow = ({
105107
value={CHECKBOX_VALUE.CHECKED}
106108
/>
107109
</div>
108-
109110
{!isIdentifierSelected && getSelectedIdentifiersCount() === 0 && (
110111
<div className="dc__visible-hover--hide-child flex left">
111112
<Icon name="ic-bg-cluster" color={null} size={24} />
@@ -148,9 +149,7 @@ export const ClusterListRow = ({
148149
</div>
149150
</div>
150151
</div>
151-
152152
{renderClusterStatus(clusterData)}
153-
154153
<div className="child-shimmer-loading">
155154
{hideDataOnLoad(clusterData.isProd ? CLUSTER_PROD_TYPE.PRODUCTION : CLUSTER_PROD_TYPE.NON_PRODUCTION)}
156155
</div>

src/components/ClusterNodes/ClusterSelectionList.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import React, { useMemo, useState } from 'react'
17+
import React, { useMemo, useRef, useState } from 'react'
1818
import dayjs, { Dayjs } from 'dayjs'
1919

2020
import {
@@ -57,8 +57,9 @@ const ClusterSelectionList: React.FC<ClusterSelectionType> = ({
5757
clusterListLoader,
5858
initialLoading,
5959
refreshData,
60-
parentRef,
6160
}) => {
61+
const parentRef = useRef<HTMLDivElement>(null)
62+
6263
const [lastSyncTime, setLastSyncTime] = useState<Dayjs>(dayjs())
6364
const [showKubeConfigModal, setKubeConfigModal] = useState(false)
6465
const [selectedClusterName, setSelectedClusterName] = useState('')

src/components/ResourceBrowser/ResourceBrowser.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import { AddClusterButton } from './PageHeader.buttons'
3535

3636
const ResourceBrowser: React.FC = () => {
3737
const abortControllerRef = useRef<AbortController>(new AbortController())
38-
const parentRef = useRef<HTMLDivElement>(null)
3938

4039
const [detailClusterListLoading, detailClusterList, , reloadDetailClusterList] = useAsync(async () => {
4140
try {
@@ -77,7 +76,6 @@ const ResourceBrowser: React.FC = () => {
7776
clusterListLoader={detailClusterListLoading}
7877
initialLoading={initialLoading}
7978
refreshData={reloadDetailClusterList}
80-
parentRef={parentRef}
8179
/>
8280
)
8381
}

src/components/ResourceBrowser/Types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ export interface ClusterSelectionType {
7979
clusterListLoader: boolean
8080
initialLoading: boolean
8181
refreshData: () => void
82-
parentRef: React.RefObject<HTMLDivElement>
8382
}
8483

8584
export interface CreateResourceType {

0 commit comments

Comments
 (0)