"use client"; import Button from "@/lib/components/ui/Button"; import { cn } from "@/lib/utils"; import Link from "next/link"; import prettyBytes from "pretty-bytes"; import { HTMLAttributes } from "react"; import { UserStats } from "../../../lib/types/User"; import { BrainConsumption } from "./BrainConsumption"; import { DateComponent } from "./Date"; import BrainSpaceChart from "./Graphs/BrainSpaceChart"; import { RequestsPerDayChart } from "./Graphs/RequestsPerDayChart"; export const UserStatistics = (userStats: UserStats): JSX.Element => { const { email, current_brain_size, max_brain_size, date, requests_stats } = userStats; return ( <>
{email}
{/* How much brain space is left */} {prettyBytes(max_brain_size - current_brain_size, { binary: true, })} /{prettyBytes(max_brain_size - 0, { binary: true })}