import * as React from "react"; import fileSize from "byte-size"; import { Link } from "gatsby"; import { GraphBar } from "./GraphBar"; import { UsageGraph } from "./UsageGraph"; // TODO: get real data const useUsageData = () => ({ filesUsed: 19_521, filesLimit: 20_000, storageUsed: 23_000_000_000, storageLimit: 1_000_000_000_000, }); const size = (bytes) => fileSize(bytes, { precision: 0 }); export default function CurrentUsage() { const { filesUsed, filesLimit, storageUsed, storageLimit } = useUsageData(); return ( <>

{`${size(storageUsed)} of ${size(storageLimit)}`}

{filesUsed} of {filesLimit} files

Storage {`${size(storageLimit)}`}
Files UPGRADE {" "} {/* TODO: proper URL */} {filesLimit}
); }