[Update/Refactor] Main Page: Translation Engines. Apply Localization.
This commit is contained in:
6
src-ui/utils/updateLabelsById.js
Normal file
6
src-ui/utils/updateLabelsById.js
Normal file
@@ -0,0 +1,6 @@
|
||||
export const updateLabelsById = (data_array, updates) => {
|
||||
return data_array.map(item => {
|
||||
const update = updates.find(update_item => update_item.id === item.id);
|
||||
return update ? { ...item, label: update.label } : item;
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user