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 @@ -109,8 +109,14 @@ const InfraEnvAgentTable: React.FC<InfraEnvAgentTableProps> = ({
109
109
} ,
110
110
) ;
111
111
const { t } = useTranslation ( ) ;
112
- const agentStatuses = agentStatus ( t ) ;
113
- const bmhStatuses = bmhStatus ( t ) ;
112
+ const { agentStatuses, bmhStatuses } = React . useMemo (
113
+ ( ) => ( {
114
+ agentStatuses : agentStatus ( t ) ,
115
+ bmhStatuses : bmhStatus ( t ) ,
116
+ } ) ,
117
+ [ t ] ,
118
+ ) ;
119
+
114
120
const {
115
121
statusCount,
116
122
hostnameFilter,
@@ -143,6 +149,7 @@ const InfraEnvAgentTable: React.FC<InfraEnvAgentTableProps> = ({
143
149
agents,
144
150
agentStatuses,
145
151
bareMetalHosts,
152
+ bmhStatuses,
146
153
onEditHostname : onEditHost ,
147
154
onApprove : onApprove ,
148
155
t,
@@ -162,6 +169,7 @@ const InfraEnvAgentTable: React.FC<InfraEnvAgentTableProps> = ({
162
169
hostActions . canEditHostname ,
163
170
hostActions . canEditBMH ,
164
171
agentStatuses ,
172
+ bmhStatuses ,
165
173
onEditHost ,
166
174
onApprove ,
167
175
agentMachines ,
You can’t perform that action at this time.
0 commit comments