get fresh diskspace when storage viz renders

This commit is contained in:
zeppi 2022-06-10 12:37:30 -04:00
parent 052c926d9b
commit 11efdf0d6d

View file

@ -1,6 +1,7 @@
// @flow
import * as React from 'react';
import I18nMessage from 'component/i18nMessage';
import { ipcRenderer } from 'electron';
type Props = {
// --- select ---
@ -14,6 +15,9 @@ type Props = {
function StorageViz(props: Props) {
const { diskSpace, viewHostingLimit, autoHostingLimit, viewBlobSpace, autoBlobSpace, privateBlobSpace } = props;
React.useEffect(() => {
ipcRenderer.send('get-disk-space');
}, []);
if (!diskSpace || !diskSpace.total) {
return (