minor code refactoring

This commit is contained in:
2023-01-05 15:22:31 +01:00
parent 1716346628
commit 97eb686eb1
2 changed files with 2 additions and 5 deletions

View File

@@ -22,7 +22,7 @@ export function StackableResult({ formattedLog, title, thumbnail, resolution, pr
return null; return null;
} }
const roundMB = (bytes: number) => `${(bytes / 1_000_000).toFixed(2)}MB` const roundMB = (bytes: number) => `${(bytes / 1_000_000).toFixed(2)}MiB`
return ( return (
<Card> <Card>

View File

@@ -56,7 +56,4 @@ try {
settings = require('../../settings.json'); settings = require('../../settings.json');
} catch (e) { } } catch (e) { }
export function directoryTree() { export const directoryTree = () => buildTreeDFS(settings.download_path || 'downloads', true)
const tree = buildTreeDFS(settings.download_path || 'downloads', true)
return tree
}