get fresh diskspace when storage viz renders
This commit is contained in:
parent
052c926d9b
commit
11efdf0d6d
1 changed files with 4 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
// @flow
|
// @flow
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import I18nMessage from 'component/i18nMessage';
|
import I18nMessage from 'component/i18nMessage';
|
||||||
|
import { ipcRenderer } from 'electron';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
// --- select ---
|
// --- select ---
|
||||||
|
@ -14,6 +15,9 @@ type Props = {
|
||||||
|
|
||||||
function StorageViz(props: Props) {
|
function StorageViz(props: Props) {
|
||||||
const { diskSpace, viewHostingLimit, autoHostingLimit, viewBlobSpace, autoBlobSpace, privateBlobSpace } = props;
|
const { diskSpace, viewHostingLimit, autoHostingLimit, viewBlobSpace, autoBlobSpace, privateBlobSpace } = props;
|
||||||
|
React.useEffect(() => {
|
||||||
|
ipcRenderer.send('get-disk-space');
|
||||||
|
}, []);
|
||||||
|
|
||||||
if (!diskSpace || !diskSpace.total) {
|
if (!diskSpace || !diskSpace.total) {
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue