import { useTranslation } from "react-i18next"; import { GiBrain } from "react-icons/gi"; import { UserStats } from "../../../lib/types/User"; export const BrainConsumption = (userStats: UserStats): JSX.Element => { const { current_brain_size, max_brain_size } = userStats; const brainFilling = current_brain_size / max_brain_size; const { t } = useTranslation(["translation","user"]); const backgroundIcon = ( ); const fillingIcon = ( ); return (
{backgroundIcon} {fillingIcon}
{/* Percentage of brain space left */} {(100 - brainFilling * 100).toFixed(2)}%{" "} {t("empty", {ns: "user"})}
); };