import useSWR from "swr"; import { FaMemory } from "react-icons/fa"; import { BiError } from "react-icons/bi"; import { formatBytes } from "utils/stats-helpers"; export default function Memory() { const { data, error } = useSWR(`/api/widgets/resources?type=memory`, { refreshInterval: 1500, }); if (error || data?.error) { return (