Web:Client:Pages:Home:InfoPanel:Body:Sub-Components:ItemTitle:ItemContextOptions Refactoring

This commit is contained in:
Akmal Isomadinov 2022-11-28 22:53:32 +05:00
parent bb83e986e3
commit 265bae4017

View File

@ -58,22 +58,8 @@ const ItemContextOptions = ({
const options = contextHelper?.getItemContextOptions();
const withId = (options) => {
if (Array.isArray(options)) {
return options.map((option) => {
if (option.items) {
option.items = withId(option.items);
}
return option.key
? { ...option, id: `info-option_${option.key}` }
: option;
});
}
return options;
};
const getData = () => {
return withId(options);
return options;
};
return (