File tree 1 file changed +10
-2
lines changed
libs/ui-lib/lib/cim/components/InfraEnv
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -108,8 +108,14 @@ const InfraEnvAgentTable: React.FC<InfraEnvAgentTableProps> = ({
108
108
} ,
109
109
) ;
110
110
const { t } = useTranslation ( ) ;
111
- const agentStatuses = agentStatus ( t ) ;
112
- const bmhStatuses = bmhStatus ( t ) ;
111
+ const { agentStatuses, bmhStatuses } = React . useMemo (
112
+ ( ) => ( {
113
+ agentStatuses : agentStatus ( t ) ,
114
+ bmhStatuses : bmhStatus ( t ) ,
115
+ } ) ,
116
+ [ t ] ,
117
+ ) ;
118
+
113
119
const {
114
120
statusCount,
115
121
hostnameFilter,
@@ -142,6 +148,7 @@ const InfraEnvAgentTable: React.FC<InfraEnvAgentTableProps> = ({
142
148
agents,
143
149
agentStatuses,
144
150
bareMetalHosts,
151
+ bmhStatuses,
145
152
onEditHostname : onEditHost ,
146
153
onApprove : onApprove ,
147
154
t,
@@ -161,6 +168,7 @@ const InfraEnvAgentTable: React.FC<InfraEnvAgentTableProps> = ({
161
168
hostActions . canEditHostname ,
162
169
hostActions . canEditBMH ,
163
170
agentStatuses ,
171
+ bmhStatuses ,
164
172
onEditHost ,
165
173
onApprove ,
166
174
agentMachines ,
You can’t perform that action at this time.
0 commit comments