import { Cache } from "mcutils-library"; import React, { ReactElement, ReactNode } from "react"; import { Popover, PopoverContent, PopoverTrigger } from "@/app/components/ui/popover"; import moment from "moment"; type CacheInformationProps = { cache: Cache; children?: ReactNode; }; export function CacheInformation({ cache, children }: CacheInformationProps): ReactElement { const isCached = cache.cached; const cacheTime = cache.cachedTime; return ( {children}

{isCached ? "Cached" : "Not Cached"}

{cacheTime !== -1 &&

{moment(cacheTime).calendar()}

}
); }