Skip to content

Commit

Permalink
Refactor components and fix minor details
Browse files Browse the repository at this point in the history
  • Loading branch information
pas-trop-de-zele committed Aug 17, 2022
1 parent 618a359 commit 68e4721
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 20 deletions.
1 change: 0 additions & 1 deletion client/components/Dropdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
border: 1px solid #aaa;
border-radius: 4px;
display: block;
flex: 1;
width: 100%;
color: #7f7f7f;
height: 27px;
Expand Down
5 changes: 2 additions & 3 deletions client/components/Dropdown.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import PureComponent from '../lib/PureComponent';
import DropdownOption from './DropdownOption';

import s from './Dropdown.css';
import {store} from '../store';
Expand All @@ -22,9 +21,9 @@ export default class Dropdown extends PureComponent {
</div>
<div>
<select className={s.select} id={label} name={label} onChange={this.handleSelection}>
<DropdownOption value={DEFAULT_DROPDOWN_SELECTION}/>
<option value={DEFAULT_DROPDOWN_SELECTION}>{DEFAULT_DROPDOWN_SELECTION}</option>
{options.map(option =>
<DropdownOption value={option}/>
<option key={option} value={option}>{option}</option>
)}
</select>
</div>
Expand Down
11 changes: 0 additions & 11 deletions client/components/DropdownOption.jsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/analyzer.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ function createModulesTree(modules) {
}

function getChunkToInitialByEntrypoint(bundleStats) {
if (bundleStats === null || bundleStats === undefined) {
if (bundleStats == null) {
return {};
}
const chunkToEntrypointInititalMap = {};
Expand Down
2 changes: 1 addition & 1 deletion src/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ function renderViewer({title, enableWebSocket, chartData, entrypoints, defaultSi
</script>
</body>
</html>`;
}
}
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ exports.open = function (uri, logger) {
} catch (err) {
logger.debug(`Opener failed to open "${uri}":\n${err}`);
}
};
};
2 changes: 1 addition & 1 deletion src/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@ function getEntrypoints(bundleStats) {
return [];
}
return Object.values(bundleStats.entrypoints || {}).map(entrypoint => entrypoint.name);
}
}
2 changes: 1 addition & 1 deletion test/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ describe('createAssetsFilter', function () {
expect(filter('bar-foo')).to.equal(true);
});

});
});

0 comments on commit 68e4721

Please sign in to comment.