@trackunit/translations-machine-type 0.0.138 → 0.0.139
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +2 -2
- package/index.esm.js +2 -2
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -1011,7 +1011,7 @@ const useMachineInsightsTranslations = () => {
|
|
|
1011
1011
|
return t("pages.machines.insights.sections.insights.insightNames.unknown");
|
|
1012
1012
|
}
|
|
1013
1013
|
};
|
|
1014
|
-
const getInsightUnitText = (key) => {
|
|
1014
|
+
const getInsightUnitText = react.useCallback((key) => {
|
|
1015
1015
|
// eslint-disable-next-line sonarjs/max-switch-cases
|
|
1016
1016
|
switch (key) {
|
|
1017
1017
|
case "AMPERE":
|
|
@@ -1100,7 +1100,7 @@ const useMachineInsightsTranslations = () => {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
return `${t("pages.machines.insights.sections.insights.units.unknown")}`;
|
|
1102
1102
|
}
|
|
1103
|
-
};
|
|
1103
|
+
}, [t]);
|
|
1104
1104
|
const getInsightSubType = (type, subtype) => {
|
|
1105
1105
|
switch (type) {
|
|
1106
1106
|
case "AFTERTREATMENTDIESELPARTICULATEFILTERACTIVEREGENERATIONSTATE":
|
package/index.esm.js
CHANGED
|
@@ -1007,7 +1007,7 @@ const useMachineInsightsTranslations = () => {
|
|
|
1007
1007
|
return t("pages.machines.insights.sections.insights.insightNames.unknown");
|
|
1008
1008
|
}
|
|
1009
1009
|
};
|
|
1010
|
-
const getInsightUnitText = (key) => {
|
|
1010
|
+
const getInsightUnitText = useCallback((key) => {
|
|
1011
1011
|
// eslint-disable-next-line sonarjs/max-switch-cases
|
|
1012
1012
|
switch (key) {
|
|
1013
1013
|
case "AMPERE":
|
|
@@ -1096,7 +1096,7 @@ const useMachineInsightsTranslations = () => {
|
|
|
1096
1096
|
}
|
|
1097
1097
|
return `${t("pages.machines.insights.sections.insights.units.unknown")}`;
|
|
1098
1098
|
}
|
|
1099
|
-
};
|
|
1099
|
+
}, [t]);
|
|
1100
1100
|
const getInsightSubType = (type, subtype) => {
|
|
1101
1101
|
switch (type) {
|
|
1102
1102
|
case "AFTERTREATMENTDIESELPARTICULATEFILTERACTIVEREGENERATIONSTATE":
|