Skip to content

Commit

Permalink
types(ui): Explic types
Browse files Browse the repository at this point in the history
  • Loading branch information
vio committed Jul 20, 2024
1 parent 4bba355 commit 3227402
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/ui/src/components/bundle-modules/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,16 @@ export const BundleModules = (props: BundleModulesProps) => {
});

const { rows, totalRowCount } = useMemo(() => {
let result;
let result: Array<types.ReportMetricModuleRow> = [];

if (moduleMetric === ModuleMetric.TOTAL_SIZE) {
result = webpack.compareModuleDuplicateSize(jobs, [addRowFlags]);
} else if (moduleMetric === ModuleMetric.SIZE) {
result = webpack.compareBySection.modules(jobs, [addRowFlags]);
}

return {
rows: result as Array<types.ReportMetricModuleRow>,
rows: result,
totalRowCount: result.length,
};
}, [jobs, moduleMetric]);
Expand Down

0 comments on commit 3227402

Please sign in to comment.