👷♀️
This commit is contained in:
@@ -1,3 +1,21 @@
|
||||
import { FundBar } from '../components/FundBar'
|
||||
import { usePromise } from '@dank-inc/use-get'
|
||||
import { useAppContext } from '../../contexts/AppContext'
|
||||
|
||||
export const Dashboard = () => {
|
||||
return <p>a dashboard</p>
|
||||
const { api } = useAppContext()
|
||||
const stacks = usePromise(api.getStacks())
|
||||
|
||||
if (stacks.loading || !stacks.data) return <div>loading...</div>
|
||||
|
||||
return (
|
||||
<>
|
||||
<h1>Remaining Balances</h1>
|
||||
<div className="funds">
|
||||
{stacks.data.map((stack, i) => (
|
||||
<FundBar stack={stack} col={i + 1} />
|
||||
))}
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user