|
|
|
@ -1,9 +1,10 @@ |
|
|
|
|
import { Stack } from '../../types' |
|
|
|
|
import './style.scss' |
|
|
|
|
import _ from 'lodash' |
|
|
|
|
import { useState } from 'react' |
|
|
|
|
import { Modal } from '../../layout/Modal' |
|
|
|
|
import { TransactionForm } from '../../forms/TransactionForm' |
|
|
|
|
import { Stack } from '../../types' |
|
|
|
|
import _ from 'lodash' |
|
|
|
|
|
|
|
|
|
import './style.scss' |
|
|
|
|
|
|
|
|
|
type Props = { |
|
|
|
|
stack: Stack |
|
|
|
@ -22,6 +23,15 @@ export const FundBar = ({ stack }: Props) => { |
|
|
|
|
setNewTx(true) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const handleCancel = () => { |
|
|
|
|
console.log('cancelling tx') |
|
|
|
|
setNewTx(false) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const handleSave = () => { |
|
|
|
|
console.log('tx saved!') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<> |
|
|
|
|
<div className="fundbar"> |
|
|
|
@ -39,8 +49,12 @@ export const FundBar = ({ stack }: Props) => { |
|
|
|
|
${Math.floor(current)} / ${max} |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<Modal visible={newTx} onCancel={() => setNewTx(false)}> |
|
|
|
|
<TransactionForm stackId={stack.id} /> |
|
|
|
|
<Modal visible={newTx}> |
|
|
|
|
<TransactionForm |
|
|
|
|
stackId={stack.id} |
|
|
|
|
onSave={handleSave} |
|
|
|
|
onCancel={handleCancel} |
|
|
|
|
/> |
|
|
|
|
</Modal> |
|
|
|
|
</> |
|
|
|
|
) |
|
|
|
|