import { Stack } from '../../types' import './style.scss' import _ from 'lodash' type Props = { stack: Stack } export const FundBar = ({ stack }: Props) => { const amount = _.sumBy(stack.transactions, 'amount') console.log('amount', stack.id, amount) const max = stack.amount const current = max - amount const percent = Math.max(current / max, 0) const hue = percent * 120 return (
console.log(`adding transaction to => ${stack.name}`)} >

{stack.name}

${Math.floor(current)} / ${max}
) }