import { graphql } from "babel-plugin-relay/macro"; import type { FC } from "react"; import React from "react"; import { useFragment } from "react-relay"; import { Table, TableRow } from "../../components"; import { formatCake } from "../../utils/cake"; import { getCurrencyLogo } from "../../utils/getCurrencyLogo"; import type { Balance_wallet$key } from "./__generated__/Balance_wallet.graphql"; type Props = { userRef: Balance_wallet$key; }; export const Balance: FC = ({ userRef }) => { const { wallet } = useFragment( graphql` fragment Balance_wallet on User { wallet { cakeBalance } } `, userRef ); const cakeBalance = formatCake(wallet.cakeBalance); return (
CAKE icon

CAKE

, cakeBalance, ]} />
); };