Skip to content

Commit

Permalink
Requested changes
Browse files Browse the repository at this point in the history
Signed-off-by: Ayoub LABIDI <ayoub.labidi@protonmail.com>
  • Loading branch information
ayolab committed Sep 8, 2023
1 parent 40e1b9e commit 99b5329
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/components/directory-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,7 @@ const DirectoryContent = () => {
function typeCellRender(cellData) {
const { rowData = {} } = cellData || {};
const elementUuid = rowData['elementUuid'];
let objectType = rowData[cellData.dataKey];
if (objectType === ElementType.PARAMETERS) {
objectType = cellData.rowData.description;
}
const objectType = rowData[cellData.dataKey];
const { subtype, format } = childrenMetadata[elementUuid] || {};
return (
<Box sx={styles.cell}>
Expand Down Expand Up @@ -412,7 +409,7 @@ const DirectoryContent = () => {
return <ArticleIcon sx={styles.icon} />;
} else if (objectType === ElementType.CASE) {
return <PhotoIcon sx={styles.icon} />;
} else if (objectType === ElementType.PARAMETERS) {
} else if (objectType === ElementType.VOLTAGE_INIT_PARAMETERS) {
return <SettingsIcon sx={styles.icon} />;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/elementType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export enum ElementType {
FILTER = 'FILTER',
CONTINGENCY_LIST = 'CONTINGENCY_LIST',
CASE = 'CASE',
PARAMETERS = 'PARAMETERS',
VOLTAGE_INIT_PARAMETERS = 'VOLTAGE_INIT_PARAMETERS',
}

export const FilterType = {
Expand Down

0 comments on commit 99b5329

Please sign in to comment.