Skip to content

Commit 8dbf14c

Browse files
committed
Set unit of file to 'M'
1 parent fd57d34 commit 8dbf14c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/courses/resourcesManager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function getSorting(order, orderBy) {
4141
const columnData = [
4242
{ id: 'File Name', numeric: false, disablePadding: false, label: 'File Name' },
4343
{ id: 'File Type', numeric: false, disablePadding: false, label: 'File Type' },
44-
{ id: 'Size', numeric: false, disablePadding: false, label: 'Size'},
44+
{ id: 'Size', numeric: false, disablePadding: false, label: 'Size(M)'},
4545
{ id: 'Preview', numeric: false, disablePadding: false, label: 'Preview' },
4646
];
4747

@@ -244,7 +244,7 @@ class ResourcesManager extends Component{
244244
<TableRow key={file.name}>
245245
<TableCell numeric={false}>{file.name}</TableCell>
246246
<TableCell numeric={false}>{file.type}</TableCell>
247-
<TableCell numeric={false}>{file.size}</TableCell>
247+
<TableCell numeric={false}>{(file.size/1024/1024).toFixed(2)}</TableCell>
248248
<TableCell numeric={false}><a href={file.preview}>Preview</a></TableCell>
249249
</TableRow>
250250
);

0 commit comments

Comments
 (0)